Package io.moquette.interception
Class AbstractInterceptHandler
- java.lang.Object
-
- io.moquette.interception.AbstractInterceptHandler
-
- All Implemented Interfaces:
InterceptHandler
public abstract class AbstractInterceptHandler extends Object implements InterceptHandler
Basic abstract class usefull to avoid empty methods creation in subclasses.
-
-
Field Summary
-
Fields inherited from interface io.moquette.interception.InterceptHandler
ALL_MESSAGE_TYPES
-
-
Constructor Summary
Constructors Constructor Description AbstractInterceptHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>[]getInterceptedMessageTypes()voidonConnect(InterceptConnectMessage msg)voidonConnectionLost(InterceptConnectionLostMessage msg)voidonDisconnect(InterceptDisconnectMessage msg)voidonMessageAcknowledged(InterceptAcknowledgedMessage msg)voidonPublish(InterceptPublishMessage msg)Called when a message is published.voidonSubscribe(InterceptSubscribeMessage msg)voidonUnsubscribe(InterceptUnsubscribeMessage msg)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.moquette.interception.InterceptHandler
getID
-
-
-
-
Method Detail
-
getInterceptedMessageTypes
public Class<?>[] getInterceptedMessageTypes()
- Specified by:
getInterceptedMessageTypesin interfaceInterceptHandler- Returns:
- the InterceptMessage subtypes that this handler can process. If the result is null or equal to ALL_MESSAGE_TYPES, all the message types will be processed.
-
onConnect
public void onConnect(InterceptConnectMessage msg)
- Specified by:
onConnectin interfaceInterceptHandler
-
onDisconnect
public void onDisconnect(InterceptDisconnectMessage msg)
- Specified by:
onDisconnectin interfaceInterceptHandler
-
onConnectionLost
public void onConnectionLost(InterceptConnectionLostMessage msg)
- Specified by:
onConnectionLostin interfaceInterceptHandler
-
onPublish
public void onPublish(InterceptPublishMessage msg)
Description copied from interface:InterceptHandlerCalled when a message is published. The receiver MUST release the payload of the message, either by calling super.onPublish, or by calling msg.getPayload.release() directly.- Specified by:
onPublishin interfaceInterceptHandler- Parameters:
msg- The message that was published.
-
onSubscribe
public void onSubscribe(InterceptSubscribeMessage msg)
- Specified by:
onSubscribein interfaceInterceptHandler
-
onUnsubscribe
public void onUnsubscribe(InterceptUnsubscribeMessage msg)
- Specified by:
onUnsubscribein interfaceInterceptHandler
-
onMessageAcknowledged
public void onMessageAcknowledged(InterceptAcknowledgedMessage msg)
- Specified by:
onMessageAcknowledgedin interfaceInterceptHandler
-
-