Interface ConnackOutboundOutput
-
- All Superinterfaces:
AsyncOutput<ConnackOutboundOutput>,SimpleAsyncOutput<ConnackOutboundOutput>
@DoNotImplement public interface ConnackOutboundOutput extends AsyncOutput<ConnackOutboundOutput>
This is the output parameter of anyConnackOutboundInterceptorproviding methods to define the outcome of CONNACK interception.It can be used to Modify an outbound CONNACK packet.
- Since:
- 4.2.0, CE 2020.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Async<ConnackOutboundOutput>async(@NotNull Duration timeout)If the timeout is expired beforeAsync.resume()is called then the outcome is handled as failed.@NotNull Async<ConnackOutboundOutput>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.@NotNull ModifiableConnackPacketgetConnackPacket()Use this object to make any changes to the CONNACK message.
-
-
-
Method Detail
-
getConnackPacket
@NotNull ModifiableConnackPacket getConnackPacket()
Use this object to make any changes to the CONNACK message.- Returns:
- A modifiable CONNACK packet.
- Since:
- 4.2.0, CE 2020.1
-
async
@NotNull Async<ConnackOutboundOutput> 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.
TimeoutFallback.FAILUREresults in closing the connection without sending a CONNACK to the client.TimeoutFallback.SUCCESSwill proceed the CONNACK.- Specified by:
asyncin interfaceAsyncOutput<ConnackOutboundOutput>- Parameters:
timeout- Timeout that HiveMQ waits for the result of the async operation.fallback- Fallback behaviour if a timeout occurs.- Returns:
- An
Asyncobject, usually containing the output object. - Throws:
UnsupportedOperationException- If async is called more than once.- Since:
- 4.2.0, CE 2020.1
-
async
@NotNull Async<ConnackOutboundOutput> async(@NotNull Duration timeout)
If the timeout is expired beforeAsync.resume()is called then the outcome is handled as failed. This means that the outcome results in closed connection without a CONNACK sent to the client.Do not call this method more than once. If an async method is called multiple times an exception is thrown.
- Specified by:
asyncin interfaceSimpleAsyncOutput<ConnackOutboundOutput>- Parameters:
timeout- Timeout that HiveMQ waits for the result of the async operation.- Returns:
- An
Asyncobject, usually containing the output object. - Throws:
UnsupportedOperationException- If async is called more than once.- Since:
- 4.2.0, CE 2020.1
-
-