public class ServerCallToObserverAdapter<T> extends CancelableStreamObserver<T> implements ServerStreamObserver<T>
| Modifier and Type | Field and Description |
|---|---|
CancellationContext |
cancellationContext |
| Constructor and Description |
|---|
ServerCallToObserverAdapter(AbstractServerCall call,
CancellationContext cancellationContext) |
| Modifier and Type | Method and Description |
|---|---|
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
|
void |
setResponseAttachments(Map<String,Object> attachments) |
beforeStart, getCancellationContext, setCancellationContext, startRequestequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdisableAutoInboundFlowControlpublic final CancellationContext cancellationContext
public ServerCallToObserverAdapter(AbstractServerCall call, CancellationContext cancellationContext)
public boolean isAutoRequestN()
public boolean isTerminated()
public void onNext(Object data)
onNext in interface org.apache.dubbo.common.stream.StreamObserver<T>public void onError(Throwable throwable)
onError in interface org.apache.dubbo.common.stream.StreamObserver<T>public void onCompleted(TriRpcStatus status)
public void onCompleted()
onCompleted in interface 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 in interface CallStreamObserver<T>compression - Compressorpublic void cancel(Throwable throwable)
cancel in class 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 in interface 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 in interface CallStreamObserver<T>count - more messagesCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.