Interface SubscribeInboundOutput
-
- All Superinterfaces:
AsyncOutput<SubscribeInboundOutput>,SimpleAsyncOutput<SubscribeInboundOutput>
@DoNotImplement public interface SubscribeInboundOutput extends AsyncOutput<SubscribeInboundOutput>
This is the output parameter of anySubscribeInboundInterceptorproviding methods to define the outcome of SUBSCRIBE interception.It can be used to modify an inbound SUBSCRIBE packet.
- Since:
- 4.2.0, CE 2020.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Async<SubscribeInboundOutput>async(@NotNull Duration timeout)If the timeout is expired beforeAsync.resume()is called then the outcome is handled as failed.@NotNull Async<SubscribeInboundOutput>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 ModifiableSubscribePacketgetSubscribePacket()Use this object to make any changes to the inbound SUBSCRIBE.
-
-
-
Method Detail
-
getSubscribePacket
@NotNull ModifiableSubscribePacket getSubscribePacket()
Use this object to make any changes to the inbound SUBSCRIBE.- Returns:
- A modifiable subscribe packet.
- Since:
- 4.2.0, CE 2020.1
-
async
@NotNull Async<SubscribeInboundOutput> 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 a Suback withSubackReasonCode.UNSPECIFIED_ERRORand the subscription will be prevented.TimeoutFallback.SUCCESSwill proceed the subscription.- Specified by:
asyncin interfaceAsyncOutput<SubscribeInboundOutput>- Parameters:
timeout- Timeout that HiveMQ waits for the result of the async operation.fallback- Fallback behaviour if a timeout occurs.- Throws:
UnsupportedOperationException- If async is called more than once.- Since:
- 4.2.0, CE 2020.1
-
async
@NotNull Async<SubscribeInboundOutput> 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 a Suback withSubackReasonCode.UNSPECIFIED_ERRORand the subscription will be prevented.Do not call this method more than once. If an async method is called multiple times an exception is thrown.
- Specified by:
asyncin interfaceSimpleAsyncOutput<SubscribeInboundOutput>- Parameters:
timeout- Timeout that HiveMQ waits for the result of the async operation.- Throws:
UnsupportedOperationException- If async is called more than once.- Since:
- 4.2.0, CE 2020.1
-
-