Interface AsyncOutput<T>
-
- All Superinterfaces:
SimpleAsyncOutput<T>
- All Known Subinterfaces:
ConnackOutboundOutput
,ConnectInboundOutput
,EnhancedAuthOutput
,PublishAuthorizerOutput
,PublishInboundOutput
,PublishOutboundOutput
,SimpleAuthOutput
,SubscribeInboundOutput
,SubscriptionAuthorizerOutput
,UnsubscribeInboundOutput
@DoNotImplement public interface AsyncOutput<T> extends SimpleAsyncOutput<T>
Enables an output object to be processed in a non-blocking way.- Since:
- 4.0.0, CE 2019.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Async<T>
async(@NotNull Duration timeout, @NotNull TimeoutFallback fallback)
If the timeout is expired beforeAsync.resume()
is called then the outcome is handled either as failed or successful, depending on the specified fallback.-
Methods inherited from interface com.hivemq.extension.sdk.api.async.SimpleAsyncOutput
async
-
-
-
-
Method Detail
-
async
@NotNull Async<T> async(@NotNull Duration timeout, @NotNull TimeoutFallback fallback)
If the timeout is expired beforeAsync.resume()
is called then the outcome is handled either as failed or successful, depending on the specified fallback.Do not call this method more than once. If an async method is called multiple times an exception is thrown.
- Parameters:
timeout
- Timeout that HiveMQ waits for the result of the async operation.fallback
- Fallback behaviour if a timeout occurs. The outcome of the output for the fallbackTimeoutFallback.SUCCESS
orTimeoutFallback.FAILURE
is specified in the implementation.- Returns:
- An
Async
object, usually containing the output object. - Throws:
UnsupportedOperationException
- If async is called more than once.- Since:
- 4.0.0, CE 2019.1
-
-