net.sf.xenqtt.client
Interface AsyncClientFactory

All Known Implementing Classes:
MqttClientFactory

public interface AsyncClientFactory

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


Method Summary
 MqttClient newAsyncClient(AsyncClientListener asyncClientListener)
          Creates an asynchronous 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.


newAsyncClient

MqttClient newAsyncClient(AsyncClientListener asyncClientListener)
                          throws IllegalStateException
Creates an asynchronous client. You may only use this method if the factory was constructed to create asynchronous clients.

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


Copyright © 2013. All Rights Reserved.