Interface ClientLifecycleEventListenerProvider
public interface ClientLifecycleEventListenerProvider
The
ClientLifecycleEventListenerProvider allows to provide an listener that listens to MQTT client based
events.
For each client a ClientLifecycleEventListener can be provided that has custom logic for those events.
- Since:
- 4.0.0, CE 2019.1
-
Method Summary
Modifier and Type Method Description @Nullable ClientLifecycleEventListenergetClientLifecycleEventListener(@NotNull ClientLifecycleEventListenerProviderInput clientLifecycleEventListenerProviderInput)This method is called by HiveMQ every time a new MQTT connection is started.
-
Method Details
-
getClientLifecycleEventListener
@Nullable @Nullable ClientLifecycleEventListener getClientLifecycleEventListener(@NotNull ClientLifecycleEventListenerProviderInput clientLifecycleEventListenerProviderInput)This method is called by HiveMQ every time a new MQTT connection is started.This provider can either supply the same EventListener (stateless or must be thread-safe) or a new one (stateful, must not be thread-safe) for each MQTT connection.
- Parameters:
clientLifecycleEventListenerProviderInput- TheClientLifecycleEventListenerProviderInput.- Returns:
- An implementation of
ClientLifecycleEventListener. The return valuenullis ignored and has the same effect as if this provider would had not been set for the connecting client. - Since:
- 4.0.0, CE 2019.1
-