Class ClientStats.Connection
java.lang.Object
org.mqtt4j.hato.ClientStats.Connection
- Enclosing class:
ClientStats
The connection's state and attempt numbers.
-
Method Summary
Modifier and TypeMethodDescriptionlongattempt()Returns the number of the latest connection attempt, asConnAck.connectionAttempt()andDisconnection.connectionAttempt()number them, or 0 before the first attempt.longReturns a lifetime count ofConnectionListenernotifications dropped because the listener fell behind.longReturns the number of the attempt that established the latest connection, or 0 if none has.state()Returns the connection's state.
-
Method Details
-
state
Returns the connection's state.- Returns:
- the connection's state
-
attempt
public long attempt()Returns the number of the latest connection attempt, asConnAck.connectionAttempt()andDisconnection.connectionAttempt()number them, or 0 before the first attempt.- Returns:
- the number of the latest connection attempt, as
ConnAck.connectionAttempt()andDisconnection.connectionAttempt()number them, or 0 before the first attempt
-
establishedAttempt
public long establishedAttempt()Returns the number of the attempt that established the latest connection, or 0 if none has. The difference fromattempt()counts the attempts since then.- Returns:
- the number of the attempt that established the latest connection, or 0 if none has
-
droppedNotifications
public long droppedNotifications()Returns a lifetime count ofConnectionListenernotifications dropped because the listener fell behind.- Returns:
- a lifetime count of
ConnectionListenernotifications dropped because the listener fell behind
-