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
  • Method Details

    • processResponse

      public void processResponse(Response response)
      Description copied from interface: DeferredAction
      Steps to process the deferred response.

      The default implementation does nothing.

      Specified by:
      processResponse in interface DeferredAction
      Parameters:
      response - Response object.
    • onException

      public void onException(Exception exception)
      Description copied from interface: DeferredAction
      Exception received when receiving or processing the response.

      The default implementation only logs the exception on debug level.

      Specified by:
      onException in interface DeferredAction
      Parameters:
      exception - exception received processing the response
    • getWarningMessageCallback

      public @Nullable WarningMessageCallback getWarningMessageCallback()
      Description copied from interface: DeferredAction
      Warning message callback.

      The default implementation returns null.

      Specified by:
      getWarningMessageCallback in interface DeferredAction
      Returns:
      warning callback to use when executing this deferred action, null signals to use the default
    • requiresSync

      public boolean requiresSync()
      Description copied from interface: DeferredAction
      Indicates if this deferred action cannot be processed without an explicit sync action (e.g. op_ping or op_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:
      requiresSync in interface DeferredAction
      Returns:
      true if this deferred action requires an explicit sync action