Package io.grpc
Class PartialForwardingServerCallListener<ReqT>
- java.lang.Object
-
- io.grpc.ServerCall.Listener<ReqT>
-
- io.grpc.PartialForwardingServerCallListener<ReqT>
-
- Direct Known Subclasses:
ForwardingServerCallListener
abstract class PartialForwardingServerCallListener<ReqT> extends ServerCall.Listener<ReqT>
AServerCall.Listenerwhich forwards all of its methods to anotherServerCall.Listenerwhich may have a different parameterized type than the onMessage() message type.
-
-
Constructor Summary
Constructors Constructor Description PartialForwardingServerCallListener()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ServerCall.Listener<?>delegate()Returns the delegatedServerCall.Listener.voidonCancel()The call was cancelled and the server is encouraged to abort processing to save resources, since the client will not process any further messages.voidonComplete()The call is considered complete andServerCall.Listener.onCancel()is guaranteed not to be called.voidonHalfClose()The client completed all message sending.voidonReady()This indicates that the call may now be capable of sending additional messages (viaServerCall.sendMessage(RespT)) without requiring excessive buffering internally.java.lang.StringtoString()-
Methods inherited from class io.grpc.ServerCall.Listener
onMessage
-
-
-
-
Method Detail
-
delegate
protected abstract ServerCall.Listener<?> delegate()
Returns the delegatedServerCall.Listener.
-
onHalfClose
public void onHalfClose()
Description copied from class:ServerCall.ListenerThe client completed all message sending. However, the call may still be cancelled.- Overrides:
onHalfClosein classServerCall.Listener<ReqT>
-
onCancel
public void onCancel()
Description copied from class:ServerCall.ListenerThe call was cancelled and the server is encouraged to abort processing to save resources, since the client will not process any further messages. Cancellations can be caused by timeouts, explicit cancellation by the client, network errors, etc.There will be no further callbacks for the call.
- Overrides:
onCancelin classServerCall.Listener<ReqT>
-
onComplete
public void onComplete()
Description copied from class:ServerCall.ListenerThe call is considered complete andServerCall.Listener.onCancel()is guaranteed not to be called. However, the client is not guaranteed to have received all messages.There will be no further callbacks for the call.
- Overrides:
onCompletein classServerCall.Listener<ReqT>
-
onReady
public void onReady()
Description copied from class:ServerCall.ListenerThis indicates that the call may now be capable of sending additional messages (viaServerCall.sendMessage(RespT)) without requiring excessive buffering internally. This event is just a suggestion and the application is free to ignore it, however doing so may result in excessive buffering within the call.Because there is a processing delay to deliver this notification, it is possible for concurrent writes to cause
isReady() == falsewithin this callback. Handle "spurious" notifications by checkingisReady()'s current value instead of assuming it is nowtrue. IfisReady() == falsethe normal expectations apply, so there would be anotheronReady()callback.- Overrides:
onReadyin classServerCall.Listener<ReqT>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-