Package com.iizix.comm.statistics
Class SessionConnectionStatistics
- java.lang.Object
- com.iizix.comm.statistics.SessionConnectionStatistics
 
- All Implemented Interfaces:
- java.lang.Cloneable
 - public class SessionConnectionStatistics extends java.lang.Object implements java.lang.CloneableSession connection statistics used on a connection basis.- Author:
- Christopher Mindus
 
- Nested Class Summary- Nested Classes - Modifier and Type - Class - Description - static class- SessionConnectionStatistics.GlobalThe cloneable global values class for the server.- static class- SessionConnectionStatistics.StateStates.
 - Field Summary- Fields - Modifier and Type - Field - Description - long- bytesReceivedSize of data received.- long- bytesSentSize of data sent.- long- lastActivityTimeThe time of the last activity (never zero).- long- lastHeartBeatDurationThe last web socket heart-beat duration (the PING-PONG message exchange in milliseconds), zero for none yet.- long- lastPingPongDurationElapsed time in milliseconds for last ping-pong transaction turn-around.- java.util.HashMap<java.lang.String,java.lang.String>- propertiesThe map of properties for the connection, null if none are present.- long- timeLastReceivedThe time of the last received transaction, zero for never.- long- timeLastSentThe time of the last sent transaction, zero for never.- long- timeStartThe start time of the connection (never zero).- long- timeStopThe stop time of the connection, zero for never.- long- transactionsReceivedCount of transactions received.- long- transactionsSentCount of transactions sent.
 - Method Summary- All Methods Static Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - protected SessionConnectionStatistics- clone()Clones this instance.- long- getDormantStartTime()Gets the time when the session began to be dormant.- static SessionConnectionStatistics.Global- getGlobalInstance()Gets a snapshot of the global instance of the transaction information for the server.- java.util.Map<java.lang.String,java.lang.String>- getProperties()Gets a copy of all properties of the last or current connection.- SessionConnectionStatistics.State- getState()Gets the session state, when not the "last" connection, it indicates the last state of this connection.- void- transferProperties(SessionConnectionStatistics other)Transfers properties from another instance, used when reconnecting a session.
 
- Field Detail- timeStart- public long timeStart The start time of the connection (never zero).
 - timeStop- public long timeStop The stop time of the connection, zero for never.
 - timeLastSent- public long timeLastSent The time of the last sent transaction, zero for never.
 - timeLastReceived- public long timeLastReceived The time of the last received transaction, zero for never.
 - lastActivityTime- public long lastActivityTime The time of the last activity (never zero).
 - bytesSent- public long bytesSent Size of data sent.
 - bytesReceived- public long bytesReceived Size of data received.
 - transactionsSent- public long transactionsSent Count of transactions sent.
 - transactionsReceived- public long transactionsReceived Count of transactions received.
 - lastPingPongDuration- public long lastPingPongDuration Elapsed time in milliseconds for last ping-pong transaction turn-around.- The value is zero if ping-pong has not been fired yet. 
 - lastHeartBeatDuration- public long lastHeartBeatDuration The last web socket heart-beat duration (the PING-PONG message exchange in milliseconds), zero for none yet.
 - properties- public java.util.HashMap<java.lang.String,java.lang.String> properties The map of properties for the connection, null if none are present.
 
 - Method Detail- getGlobalInstance- public static SessionConnectionStatistics.Global getGlobalInstance() Gets a snapshot of the global instance of the transaction information for the server.
 - clone- protected SessionConnectionStatistics clone() Clones this instance.- Overrides:
- clonein class- java.lang.Object
 
 - getState- public SessionConnectionStatistics.State getState() Gets the session state, when not the "last" connection, it indicates the last state of this connection.
 - getDormantStartTime- public long getDormantStartTime() Gets the time when the session began to be dormant.- Returns:
- Zero if session is not dormant.
 
 - getProperties- public java.util.Map<java.lang.String,java.lang.String> getProperties() Gets a copy of all properties of the last or current connection.- Returns:
- The copy of the properties, or null if none are present.
 
 - transferProperties- public void transferProperties(SessionConnectionStatistics other) Transfers properties from another instance, used when reconnecting a session.