Methods that use callbacks are deprecated and will be removed in a future release. Use CompletableFuture variant instead.
@Deprecated public interface Callback
Direct extensions of this interface support a single callback each time the
callback is used in a call (the call context). If the call fails to
return a result, for example if the session is closed or the operation times
out, onDiscard
will be called. Each call to the server
will result in invocation of either a single callback method or
onDiscard
.
In most cases where a Callback can be used it is also possible to use a
ContextCallback
which may be more useful if there is a need to
correlate the Callback invocation with the request that it matches. For
example, if the same Callback is used for severals requests, it might be
useful to be able to associate the reply (or discard) with the request that
was made using some context object.
If the server returns a response for an unknown call context (typically a
late response for a call context has timed out), an error will be reported to
the session error handler
.
ContextCallback
Modifier and Type | Interface and Description |
---|---|
static class |
Callback.Default
Deprecated.
Abstract default callback.
|
Modifier and Type | Method and Description |
---|---|
void |
onDiscard()
Deprecated.
This is called to notify that a call context was closed prematurely,
typically due to a timeout or the session being closed.
|
Copyright © 2024 DiffusionData Ltd. All Rights Reserved.