public class ServerCallToObserverAdapter<T> extends CancelableStreamObserver<T> implements ServerStreamObserver<T>
| 限定符和类型 | 字段和说明 |
|---|---|
CancellationContext |
cancellationContext |
| 构造器和说明 |
|---|
ServerCallToObserverAdapter(AbstractServerCall call,
CancellationContext cancellationContext) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
cancel(Throwable throwable) |
void |
disableAutoFlowControl()
Swaps to manual flow control where no message will be delivered to
StreamObserver.onNext(Object) unless it is request()ed. |
boolean |
isAutoRequestN() |
boolean |
isTerminated() |
boolean |
isTimeout(long cost) |
void |
onCompleted() |
void |
onCompleted(TriRpcStatus status) |
void |
onError(Throwable throwable) |
void |
onNext(Object data) |
void |
request(int count)
Requests the peer to produce
count more messages to be delivered to the 'inbound'
StreamObserver. |
void |
setCompression(String compression)
Sets the compression algorithm to use for the call
For stream set compression needs to determine whether the metadata has been sent, and carry
on corresponding processing
|
void |
setResponseAttachments(Map<String,Object> attachments) |
beforeStart, getCancellationContext, setCancellationContext, startRequestdisableAutoInboundFlowControlpublic final CancellationContext cancellationContext
public ServerCallToObserverAdapter(AbstractServerCall call, CancellationContext cancellationContext)
public boolean isAutoRequestN()
public boolean isTerminated()
public void onNext(Object data)
onNext 在接口中 org.apache.dubbo.common.stream.StreamObserver<T>public void onError(Throwable throwable)
onError 在接口中 org.apache.dubbo.common.stream.StreamObserver<T>public void onCompleted(TriRpcStatus status)
public void onCompleted()
onCompleted 在接口中 org.apache.dubbo.common.stream.StreamObserver<T>public void setCompression(String compression)
CallStreamObserverFor stream set compression needs to determine whether the metadata has been sent, and carry on corresponding processing
setCompression 在接口中 CallStreamObserver<T>compression - Compressorpublic void cancel(Throwable throwable)
cancel 在类中 CancelableStreamObserver<T>public boolean isTimeout(long cost)
public void disableAutoFlowControl()
CallStreamObserverStreamObserver.onNext(Object) unless it is request()ed. Since request() may not be called before the call is started, a number of initial requests may be
specified.disableAutoFlowControl 在接口中 CallStreamObserver<T>public void request(int count)
CallStreamObservercount more messages to be delivered to the 'inbound'
StreamObserver.
This method is safe to call from multiple threads without external synchronization.
request 在接口中 CallStreamObserver<T>count - more messagesCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.