net.sf.xenqtt.client
Interface SyncClientFactory

All Known Implementing Classes:
MqttClientFactory

public interface SyncClientFactory

Used to create multiple "sibling" synchronous clients that share an Executor, broker URI, etc.


Method Summary
 MqttClient newSynchronousClient(MqttClientListener mqttClientListener)
          Creates a synchronous client.
 void shutdown()
          Stops this factory.
 

Method Detail

shutdown

void shutdown()
Stops this factory. Closes all open connections to the broker. Blocks until shutdown is complete. Any other methods called after this have unpredictable results.


newSynchronousClient

MqttClient newSynchronousClient(MqttClientListener mqttClientListener)
                                throws IllegalStateException
Creates a synchronous client. You may only use this method if the factory was constructed to create synchronous clients.

Parameters:
mqttClientListener - Handles events from this client's channel. Use MqttClientListener.NULL_LISTENER if you don't want to receive messages or be notified of events.
Returns:
A new synchronous client
Throws:
IllegalStateException - If this factory was constructed to create asynchronous clients and not synchronous clients.


Copyright © 2013. All Rights Reserved.