public interface Registration
Such a handler reference is provided whenever a handler with a server side presence is registered.
Modifier and Type | Method and Description |
---|---|
CompletableFuture<?> |
close()
Request that the handler is unregistered from the server.
|
CompletableFuture<?> close()
After the handler is unregistered, the handler's onClose
method
will be called.
A handler can only be unregistered once. A given instance will return the same CompletableFuture if this method is called more than once.
If the task completes successfully, the CompletableFuture result will be null. The result type is any rather than Void to provide forward compatibility with future iterations of this API that may provide a non-null result with a more specific result type.
Otherwise, the CompletableFuture will complete exceptionally with
a CompletionException
. Common reasons for failure, listed
by the exception reported as the
cause
, include:
SessionClosedException
– if the session is
closed.
Copyright © 2024 DiffusionData Ltd. All Rights Reserved.