C
- context object typeMethods that use contextual callbacks are deprecated and will be removed in a future release. Use CompletableFuture variant instead.
@Deprecated public interface ContextCallback<C>
This interface and its extensions are alternatives to the Callback
interface hierarchy that allow the application to associate an arbitrary
context object with each call. Any suitable application object can be
provided as the context. It will be passed on to the corresponding callback
methods, allowing requests and responses to be correlated. The context object
is optional (it may be null
).
In all other respects Callback
and ContextCallback
behave
identically.
Callback
,
ContextStream
Modifier and Type | Interface and Description |
---|---|
static class |
ContextCallback.Default<C>
Deprecated.
Abstract default callback.
|
Modifier and Type | Method and Description |
---|---|
void |
onError(C context,
ErrorReason errorReason)
Deprecated.
Notification of a contextual error related to this callback.
|
void onError(C context, ErrorReason errorReason)
onError
is called include the session being closed, a
communication timeout, or a problem with the provided parameters. No
further calls will be made to this callback for the call context.context
- the context object supplied when making the call. May be
null
.errorReason
- a value representing the error; this can be one of
constants defined in ErrorReason
, or a feature-specific
reasonCopyright © 2024 DiffusionData Ltd. All Rights Reserved.