Module org.firebirdsql.jaybird
Package org.firebirdsql.gds.ng.wire
Class DeferredAction.DelegatingDeferredAction
java.lang.Object
org.firebirdsql.gds.ng.wire.DeferredAction.DelegatingDeferredAction
- All Implemented Interfaces:
DeferredAction
- Enclosing interface:
- DeferredAction
public abstract static class DeferredAction.DelegatingDeferredAction
extends Object
implements DeferredAction
Deferred action implementation that delegates to another deferred action.
This class is intended as a base class for implementations that want to decorate method calls. To decorate it,
subclass this class, and override the method, and ensure you call super.<overridden-method> in such a
way that it is always called, even if the decoration fails.
- Since:
- 6.0.4
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.firebirdsql.gds.ng.wire.DeferredAction
DeferredAction.Builder, DeferredAction.DelegatingDeferredAction -
Field Summary
Fields inherited from interface org.firebirdsql.gds.ng.wire.DeferredAction
NO_OP_INSTANCE -
Method Summary
Modifier and TypeMethodDescription@Nullable WarningMessageCallbackWarning message callback.voidonException(Exception exception) Exception received when receiving or processing the response.voidprocessResponse(Response response) Steps to process the deferred response.booleanIndicates if this deferred action cannot be processed without an explicit sync action (e.g.
-
Method Details
-
processResponse
Description copied from interface:DeferredActionSteps to process the deferred response.The default implementation does nothing.
- Specified by:
processResponsein interfaceDeferredAction- Parameters:
response- Response object.
-
onException
Description copied from interface:DeferredActionException received when receiving or processing the response.The default implementation only logs the exception on debug level.
- Specified by:
onExceptionin interfaceDeferredAction- Parameters:
exception- exception received processing the response
-
getWarningMessageCallback
Description copied from interface:DeferredActionWarning message callback.The default implementation returns
null.- Specified by:
getWarningMessageCallbackin interfaceDeferredAction- Returns:
- warning callback to use when executing this deferred action,
nullsignals to use the default
-
requiresSync
public boolean requiresSync()Description copied from interface:DeferredActionIndicates if this deferred action cannot be processed without an explicit sync action (e.g.op_pingorop_batch_sync). Should also be used for requests which haven't been explicitly flushed.Failure to perform such a sync action may result in indefinitely blocking on read.
- Specified by:
requiresSyncin interfaceDeferredAction- Returns:
trueif this deferred action requires an explicit sync action
-