public class ClientState
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
MqttToken |
checkForActivity(IMqttActionListener pingCallback)
Check and send a ping if needed and check for ping timeout.
|
void |
connected()
Called when the client has successfully connected to the broker
|
void |
disconnected(MqttException reason)
Called when the client has been disconnected from the broker.
|
int |
getActualInFlight() |
java.util.Properties |
getDebug() |
int |
getMaxInFlight() |
void |
notifyQueueLock() |
void |
notifyReceivedBytes(int receivedBytesCount) |
void |
notifySentBytes(int sentBytesCount)
COMMENTED OUT AS NO LONGER USED.
|
void |
persistBufferedMessage(MqttWireMessage message)
Persists a buffered message to the persistence layer
|
void |
quiesce(long timeout)
Quiesce the client state, preventing any new messages getting sent,
and preventing the callback on any newly received messages.
|
java.util.Vector |
resolveOldTokens(MqttException reason)
Called during shutdown to work out if there are any tokens still
to be notified and waiters to be unblocked.
|
void |
send(MqttWireMessage message,
MqttToken token)
Submits a message for delivery.
|
void |
setKeepAliveInterval(long interval) |
void |
unPersistBufferedMessage(MqttWireMessage message) |
public void send(MqttWireMessage message, MqttToken token) throws MqttException
message
- the message to sendtoken
- the token that can be used to track delivery of the messageMqttException
public void persistBufferedMessage(MqttWireMessage message)
message
- MqttPersistenceException
public void unPersistBufferedMessage(MqttWireMessage message) throws MqttPersistenceException
MqttPersistenceException
public MqttToken checkForActivity(IMqttActionListener pingCallback) throws MqttException
MqttException
public void setKeepAliveInterval(long interval)
public void notifySentBytes(int sentBytesCount)
public void notifyReceivedBytes(int receivedBytesCount)
public void connected()
public java.util.Vector resolveOldTokens(MqttException reason)
reason
- The root cause of the disconnection, or null if it is a clean disconnectpublic void disconnected(MqttException reason)
reason
- The root cause of the disconnection, or null if it is a clean disconnectpublic void quiesce(long timeout)
public void notifyQueueLock()
public int getActualInFlight()
public int getMaxInFlight()
public java.util.Properties getDebug()