- All Known Subinterfaces:
PullAllResponseHandler,PullResponseHandler
- All Known Implementing Classes:
AutoPullResponseHandler,BasicPullResponseHandler,BeginTxResponseHandler,ChannelReleasingResetResponseHandler,CommitTxResponseHandler,HelloResponseHandler,HelloV51ResponseHandler,LegacyPullAllResponseHandler,LogoffResponseHandler,LogonResponseHandler,NoOpResponseHandler,PingResponseHandler,ResetResponseHandler,RollbackTxResponseHandler,RouteMessageResponseHandler,RoutingResponseHandler,RunResponseHandler,TelemetryResponseHandler
public interface ResponseHandler
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanTells whether this response handler is able to manage auto-read of the underlying connection usingConnection.enableAutoRead()andConnection.disableAutoRead().default voidIf this response handler is able to manage auto-read of the underlying connection, then this method signals it to stop changing auto-read setting for the connection.voidvoidvoid
-
Method Details
-
onSuccess
-
onFailure
-
onRecord
-
canManageAutoRead
default boolean canManageAutoRead()Tells whether this response handler is able to manage auto-read of the underlying connection usingConnection.enableAutoRead()andConnection.disableAutoRead().Implementations can use auto-read management to apply network-level backpressure when receiving a stream of records. There should only be a single such handler active for a connection at one point in time. Otherwise, handlers can interfere and turn on/off auto-read racing with each other.
InboundMessageDispatcheris responsible for tracking these handlers and disabling auto-read management to maintain just a single auto-read managing handler per connection. -
disableAutoReadManagement
default void disableAutoReadManagement()If this response handler is able to manage auto-read of the underlying connection, then this method signals it to stop changing auto-read setting for the connection.
-