Interface PublishOutboundInterceptor
-
- All Superinterfaces:
Interceptor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface PublishOutboundInterceptor extends Interceptor
Interface for the publish outbound interception.Interceptors are always called by the same thread for all messages for the same client.
If the same instance is shared between multiple clients it can be called by different threads and must therefore be thread-safe.
- Since:
- 4.2.0, CE 2020.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onOutboundPublish(@NotNull PublishOutboundInput publishOutboundInput, @NotNull PublishOutboundOutput publishOutboundOutput)
When aPublishOutboundInterceptor
is set through any extension, this method gets called for every outgoing PUBLISH packet from any MQTT client.
-
-
-
Method Detail
-
onOutboundPublish
void onOutboundPublish(@NotNull PublishOutboundInput publishOutboundInput, @NotNull PublishOutboundOutput publishOutboundOutput)
When aPublishOutboundInterceptor
is set through any extension, this method gets called for every outgoing PUBLISH packet from any MQTT client.When the extension is enabled after HiveMQ is already running, this method will also be called for future PUBLISHes of clients that are already connected.
- Parameters:
publishOutboundInput
- ThePublishOutboundInput
parameter.publishOutboundOutput
- ThePublishOutboundOutput
parameter.- Since:
- 4.2.0, CE 2020.1
-
-