public interface Interceptor
An interface is used instead of a class to allow more flexibility in changing an implementation.
Interceptor implementations forward notifications to a InterceptHandler, that is
normally a field. So, the implementations should act as a proxy to a custom intercept handler.
InterceptHandler| 限定符和类型 | 方法和说明 |
|---|---|
void |
addInterceptHandler(InterceptHandler interceptHandler) |
void |
notifyClientConnected(io.netty.handler.codec.mqtt.MqttConnectMessage msg) |
void |
notifyClientConnectionLost(String clientID,
String username) |
void |
notifyClientDisconnected(String clientID,
String username) |
void |
notifyMessageAcknowledged(InterceptAcknowledgedMessage msg) |
void |
notifyTopicPublished(io.netty.handler.codec.mqtt.MqttPublishMessage msg,
String clientID,
String username) |
void |
notifyTopicSubscribed(Subscription sub,
String username) |
void |
notifyTopicUnsubscribed(String topic,
String clientID,
String username) |
void |
removeInterceptHandler(InterceptHandler interceptHandler) |
void notifyClientConnected(io.netty.handler.codec.mqtt.MqttConnectMessage msg)
void notifyTopicPublished(io.netty.handler.codec.mqtt.MqttPublishMessage msg,
String clientID,
String username)
void notifyTopicSubscribed(Subscription sub, String username)
void notifyTopicUnsubscribed(String topic, String clientID, String username)
void notifyMessageAcknowledged(InterceptAcknowledgedMessage msg)
void addInterceptHandler(InterceptHandler interceptHandler)
void removeInterceptHandler(InterceptHandler interceptHandler)
Copyright © 2021. All rights reserved.