public interface DeferredAction
This interfaces is used in protocol 11 or higher.
Modifier and Type | Method and Description |
---|---|
WarningMessageCallback |
getWarningMessageCallback() |
default void |
onException(java.lang.Exception exception)
Exception received when receiving or processing the response.
|
void |
processResponse(Response response)
Steps to process the deferred response.
|
static <T> DeferredAction |
wrapDeferredResponse(DeferredResponse<T> deferredResponse,
java.util.function.Function<Response,T> responseMapper,
WarningMessageCallback warningMessageCallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
Wraps a
DeferredResponse in a DeferredAction . |
void processResponse(Response response)
response
- Response object.default void onException(java.lang.Exception exception)
The default implementation only logs the exception on debug level.
exception
- exception received processing the responseWarningMessageCallback getWarningMessageCallback()
static <T> DeferredAction wrapDeferredResponse(DeferredResponse<T> deferredResponse, java.util.function.Function<Response,T> responseMapper, WarningMessageCallback warningMessageCallback, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
DeferredResponse
in a DeferredAction
.T
- response type of the deferred responsedeferredResponse
- the deferred response to wrapresponseMapper
- conversion from a Response
to the appropriate object (or null
) to call on
DeferredResponse.onResponse(Object)
warningMessageCallback
- warning message callback to use when receiving the responseexceptionConsumer
- action to take for exceptionsCopyright © 2001-2024 Jaybird (Firebird JDBC) team. All rights reserved.