|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.paho.client.mqttv3.internal.ClientComms
public class ClientComms
Handles client communications with the server. Sends and receives MQTT V3 messages.
Field Summary | |
---|---|
static String |
BUILD_LEVEL
|
static String |
VERSION
|
Constructor Summary | |
---|---|
ClientComms(IMqttAsyncClient client,
MqttClientPersistence persistence)
Creates a new ClientComms object, using the specified module to handle the network calls. |
Method Summary | |
---|---|
void |
close()
Close and tidy up. |
void |
connect(MqttConnectOptions options,
MqttToken token)
Sends a connect message and waits for an ACK or NACK. |
void |
connectComplete(MqttConnack cack,
MqttException mex)
|
protected void |
deliveryComplete(MqttPublish msg)
|
void |
disconnect(MqttDisconnect disconnect,
long quiesceTimeout,
MqttToken token)
|
IMqttAsyncClient |
getClient()
|
ClientState |
getClientState()
|
MqttConnectOptions |
getConOptions()
|
Properties |
getDebug()
|
long |
getKeepAlive()
|
int |
getNetworkModuleIndex()
|
NetworkModule[] |
getNetworkModules()
|
MqttDeliveryToken[] |
getPendingDeliveryTokens()
|
protected MqttTopic |
getTopic(String topic)
|
boolean |
isClosed()
|
boolean |
isConnected()
|
boolean |
isConnecting()
|
boolean |
isDisconnected()
|
boolean |
isDisconnecting()
|
void |
sendNoWait(MqttWireMessage message,
MqttToken token)
Sends a message to the broker if in connected state, but only waits for the message to be stored, before returning. |
void |
setCallback(MqttCallback mqttCallback)
|
void |
setNetworkModuleIndex(int index)
|
void |
setNetworkModules(NetworkModule[] networkModules)
|
void |
shutdownConnection(MqttToken token,
MqttException reason)
Shuts down the connection to the server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String VERSION
public static String BUILD_LEVEL
Constructor Detail |
---|
public ClientComms(IMqttAsyncClient client, MqttClientPersistence persistence) throws MqttException
MqttException
Method Detail |
---|
public void sendNoWait(MqttWireMessage message, MqttToken token) throws MqttException
MqttException
public void close() throws MqttException
MqttException
- if not disconnectedpublic void connect(MqttConnectOptions options, MqttToken token) throws MqttException
MqttException
public void connectComplete(MqttConnack cack, MqttException mex) throws MqttException
MqttException
public void shutdownConnection(MqttToken token, MqttException reason)
public void disconnect(MqttDisconnect disconnect, long quiesceTimeout, MqttToken token) throws MqttException
MqttException
public boolean isConnected()
public boolean isConnecting()
public boolean isDisconnected()
public boolean isDisconnecting()
public boolean isClosed()
public void setCallback(MqttCallback mqttCallback)
protected MqttTopic getTopic(String topic)
public void setNetworkModuleIndex(int index)
public int getNetworkModuleIndex()
public NetworkModule[] getNetworkModules()
public void setNetworkModules(NetworkModule[] networkModules)
public MqttDeliveryToken[] getPendingDeliveryTokens()
protected void deliveryComplete(MqttPublish msg) throws MqttPersistenceException
MqttPersistenceException
public IMqttAsyncClient getClient()
public long getKeepAlive()
public ClientState getClientState()
public MqttConnectOptions getConOptions()
public Properties getDebug()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |