Package com.iizix.comm.session
Interface ISessionStatistics
- All Known Subinterfaces:
ISessionTransMgr
- All Known Implementing Classes:
NonUIClient,SessionID,SessionTransMgr
public interface ISessionStatisticsInterface used for the session statistics.- Author:
- Christopher Mindus
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default longgetLastConnectionTime()Gets the last connection time.default java.util.Map<java.lang.String,java.lang.String>getProperties()Gets a copy of all properties of the last or current connection.default java.lang.StringgetProperty(java.lang.String name, boolean searchPrevious)Gets a property.SessionStatisticsgetSessionStatistics()Gets the statistics instance of the session.default voidsetProperty(java.lang.String name, java.lang.String value)Sets a property for the session.
Method Detail
getSessionStatistics
SessionStatistics getSessionStatistics()
Gets the statistics instance of the session.- Returns:
- The SessionStatistics instance.
setProperty
default void setProperty(java.lang.String name, java.lang.String value)Sets a property for the session. When a reconnection is done, the previous statistics instance keeps track of the differences in properties between the last properties and the new ones.The default implementation delegates this call to
{@link SessionStatistics#setProperty(String, String)}.- Parameters:
name- The property name.value- The value to set, non-null.- Throws:
java.lang.NullPointerException- If eithernameorvalueisnull.
getProperty
default java.lang.String getProperty(java.lang.String name, boolean searchPrevious)Gets a property.- Parameters:
name- The property name.searchPrevious- Flag indicating previous connections should be included in locating the property. Searching is done backwards in history.The default implementation delegates this call to
{@link SessionStatistics#getProperty(String, boolean)}.- Returns:
- The value, or null if not found.
- Throws:
java.lang.NullPointerException- Ifnameisnull.
getProperties
default java.util.Map<java.lang.String,java.lang.String> getProperties()
Gets a copy of all properties of the last or current connection.The default implementation delegates this call to
{@link SessionStatistics#getProperties()}.- Returns:
- The copy of the properties, or null if none are present.
getLastConnectionTime
default long getLastConnectionTime()
Gets the last connection time.The default implementation delegates this call to
{@link SessionStatistics#getLastConnectionTime()}.- Returns:
- The time in milliseconds like System.currentTimeMillis(), or zero if not connected ever.