@Test public void testNotifyClientConnected() throws Exception { interceptor.notifyClientConnected(MqttMessageBuilders.connect().build()); interval(); assertEquals(40, n.get()); }
@Override public void notifyClientConnected(final MqttConnectMessage msg) { for (final InterceptHandler handler : this.handlers.get(InterceptConnectMessage.class)) { if(LOG.isDebugEnabled()){ LOG.debug("Sending MQTT CONNECT message to interceptor. CId={}, interceptorId={}", msg.payload().clientIdentifier(), handler.getID()); } executor.execute(new Runnable() { @Override public void run() { handler.onConnect(new InterceptConnectMessage(msg)); } }); } }
BrokerInterceptor implements Interceptor { @Override public void notifyClientConnected(final MqttConnectMessage msg) { for (final InterceptHandler handler : this.handlers.get(InterceptConnectMessage.class)) { if(LOG.isDebugEnabled()){ LOG.debug("Sending MQTT CONNECT message to interceptor. CId={}, interceptorId={}", msg.payload().clientIdentifier(), handler.getID()); } executor.execute(new Runnable() { @Override public void run() { handler.onConnect(new InterceptConnectMessage(msg)); } }); } } }
BrokerInterceptor implements Interceptor { @Override public void notifyClientConnected(final MqttConnectMessage msg) { for (final InterceptHandler handler : this.handlers.get(InterceptConnectMessage.class)) { if(LOG.isDebugEnabled()){ LOG.debug("Sending MQTT CONNECT message to interceptor. CId={}, interceptorId={}", msg.payload().clientIdentifier(), handler.getID()); } executor.execute(new Runnable() { @Override public void run() { handler.onConnect(new InterceptConnectMessage(msg)); } }); } } private  BrokerInterceptor(int poolSize, List<InterceptHandler> handlers);   BrokerInterceptor(List<InterceptHandler> handlers);   BrokerInterceptor(IConfig props, List<InterceptHandler> handlers); }
BrokerInterceptor implements Interceptor { @Override public void notifyClientConnected(final MqttConnectMessage msg) { for (final InterceptHandler handler : this.handlers.get(InterceptConnectMessage.class)) { if(LOG.isDebugEnabled()){ LOG.debug("Sending MQTT CONNECT message to interceptor. CId={}, interceptorId={}", msg.payload().clientIdentifier(), handler.getID()); } executor.execute(new Runnable() { @Override public void run() { handler.onConnect(new InterceptConnectMessage(msg)); } }); } } private  BrokerInterceptor(int poolSize, List<InterceptHandler> handlers);   BrokerInterceptor(List<InterceptHandler> handlers);   BrokerInterceptor(IConfig props, List<InterceptHandler> handlers); @Override void notifyClientConnected(final MqttConnectMessage msg); @Override void notifyClientDisconnected(final String clientID, final String username); @Override void notifyClientConnectionLost(final String clientID, final String username); @Override void notifyTopicPublished(final MoquetteMessage msg, final String clientID, final String username); @Override void notifyTopicSubscribed(final Subscription sub, final String username); @Override void notifyTopicUnsubscribed(final String topic, final String clientID, final String username); @Override void notifyMessageAcknowledged(final InterceptAcknowledgedMessage msg); @Override void addInterceptHandler(InterceptHandler interceptHandler); @Override void removeInterceptHandler(InterceptHandler interceptHandler); }
BrokerInterceptor implements Interceptor { @Override public void notifyClientConnected(final MqttConnectMessage msg) { for (final InterceptHandler handler : this.handlers.get(InterceptConnectMessage.class)) { if(LOG.isDebugEnabled()){ LOG.debug("Sending MQTT CONNECT message to interceptor. CId={}, interceptorId={}", msg.payload().clientIdentifier(), handler.getID()); } executor.execute(new Runnable() { @Override public void run() { handler.onConnect(new InterceptConnectMessage(msg)); } }); } } private  BrokerInterceptor(int poolSize, List<InterceptHandler> handlers);   BrokerInterceptor(List<InterceptHandler> handlers);   BrokerInterceptor(IConfig props, List<InterceptHandler> handlers); @Override void notifyClientConnected(final MqttConnectMessage msg); @Override void notifyClientDisconnected(final String clientID, final String username); @Override void notifyClientConnectionLost(final String clientID, final String username); @Override void notifyTopicPublished(final MoquetteMessage msg, final String clientID, final String username); @Override void notifyTopicSubscribed(final Subscription sub, final String username); @Override void notifyTopicUnsubscribed(final String topic, final String clientID, final String username); @Override void notifyMessageAcknowledged(final InterceptAcknowledgedMessage msg); @Override void addInterceptHandler(InterceptHandler interceptHandler); @Override void removeInterceptHandler(InterceptHandler interceptHandler);  }