Package org.apache.mina.integration.jmx
Class IoSessionManager
- java.lang.Object
-
- org.apache.mina.integration.jmx.IoSessionManager
-
- All Implemented Interfaces:
IoSessionManagerMBean
public class IoSessionManager extends java.lang.Object implements IoSessionManagerMBean
-
-
Constructor Summary
Constructors Constructor Description IoSessionManager(org.apache.mina.common.IoSession session)create the session manager
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFirstLoggingFilter()add a logging filter at begining of the chainvoidaddLastLoggingFilter()add a logging filter at end of the chainvoidclose()close the sessionlonggetBothIdleTime()read and write IDLE timefloatgetByteReadThroughtput()get the read bytes per second throughput works only if a stat collector is inspecting this session,floatgetByteWrittenThroughtput()get the written bytes per second throughput works only if a stat collector is inspecting this session,java.util.DategetCreationTime()when the session was createdjava.lang.String[]getInstalledFilters()get the list of filters installed in the filter chainjava.util.DategetLastIoTime()last time the session processed an IOjava.util.DategetLastReadTime()last time the session processed an readjava.util.DategetLastWriteTime()last time the session processed a writefloatgetMessageReadThroughtput()get the read messages per second throughput works only if a stat collector is inspecting this session, and only if a ProtocolDecoderFilter is usedfloatgetMessageWrittenThroughtput()get the written messages per second throughput works only if a stat collector is inspecting this session, and only if a ProtocolDecoderFilter is usedlonggetReadBytes()bytes read from the beginninglonggetReadIdleTime()read IDLE timelonggetReadMessages()PDU decoded from the beginning.longgetWriteIdleTime()write IDLE timelonggetWrittenBytes()bytes written from the beginninglonggetWrittenMessages()PDU encoded from the beginning.booleanisConnected()is the session is connectedvoidremoveFirstLoggingFilter()remove the logging filter at begining of the chainvoidremoveLastLoggingFilter()remove the logging filter at end of the chain
-
-
-
Method Detail
-
isConnected
public boolean isConnected()
Description copied from interface:IoSessionManagerMBeanis the session is connected- Specified by:
isConnectedin interfaceIoSessionManagerMBean- Returns:
- connection status
-
getReadBytes
public long getReadBytes()
Description copied from interface:IoSessionManagerMBeanbytes read from the beginning- Specified by:
getReadBytesin interfaceIoSessionManagerMBean- Returns:
- total of bytes read
-
getWrittenBytes
public long getWrittenBytes()
Description copied from interface:IoSessionManagerMBeanbytes written from the beginning- Specified by:
getWrittenBytesin interfaceIoSessionManagerMBean- Returns:
- total of bytes written
-
getReadMessages
public long getReadMessages()
Description copied from interface:IoSessionManagerMBeanPDU decoded from the beginning. Only revelent if a ProtocolCodecFilter is installed.- Specified by:
getReadMessagesin interfaceIoSessionManagerMBean- Returns:
- Number of read messages
-
getWrittenMessages
public long getWrittenMessages()
Description copied from interface:IoSessionManagerMBeanPDU encoded from the beginning. Only revelent if a ProtocolCodecFilter is installed.- Specified by:
getWrittenMessagesin interfaceIoSessionManagerMBean- Returns:
- Number of written messages
-
close
public void close() throws java.lang.InterruptedExceptionDescription copied from interface:IoSessionManagerMBeanclose the session- Specified by:
closein interfaceIoSessionManagerMBean- Throws:
java.lang.InterruptedException
-
getCreationTime
public java.util.Date getCreationTime()
Description copied from interface:IoSessionManagerMBeanwhen the session was created- Specified by:
getCreationTimein interfaceIoSessionManagerMBean- Returns:
- the date of session creation
-
getLastIoTime
public java.util.Date getLastIoTime()
Description copied from interface:IoSessionManagerMBeanlast time the session processed an IO- Specified by:
getLastIoTimein interfaceIoSessionManagerMBean- Returns:
- date of last IO
-
getLastReadTime
public java.util.Date getLastReadTime()
Description copied from interface:IoSessionManagerMBeanlast time the session processed an read- Specified by:
getLastReadTimein interfaceIoSessionManagerMBean- Returns:
- date of last read
-
getLastWriteTime
public java.util.Date getLastWriteTime()
Description copied from interface:IoSessionManagerMBeanlast time the session processed a write- Specified by:
getLastWriteTimein interfaceIoSessionManagerMBean- Returns:
- date of last write
-
getInstalledFilters
public java.lang.String[] getInstalledFilters()
Description copied from interface:IoSessionManagerMBeanget the list of filters installed in the filter chain- Specified by:
getInstalledFiltersin interfaceIoSessionManagerMBean- Returns:
- array of filter names
-
addLastLoggingFilter
public void addLastLoggingFilter()
Description copied from interface:IoSessionManagerMBeanadd a logging filter at end of the chain- Specified by:
addLastLoggingFilterin interfaceIoSessionManagerMBean
-
removeLastLoggingFilter
public void removeLastLoggingFilter()
Description copied from interface:IoSessionManagerMBeanremove the logging filter at end of the chain- Specified by:
removeLastLoggingFilterin interfaceIoSessionManagerMBean
-
addFirstLoggingFilter
public void addFirstLoggingFilter()
Description copied from interface:IoSessionManagerMBeanadd a logging filter at begining of the chain- Specified by:
addFirstLoggingFilterin interfaceIoSessionManagerMBean
-
removeFirstLoggingFilter
public void removeFirstLoggingFilter()
Description copied from interface:IoSessionManagerMBeanremove the logging filter at begining of the chain- Specified by:
removeFirstLoggingFilterin interfaceIoSessionManagerMBean
-
getReadIdleTime
public long getReadIdleTime()
Description copied from interface:IoSessionManagerMBeanread IDLE time- Specified by:
getReadIdleTimein interfaceIoSessionManagerMBean- Returns:
- read idle time in milli-seconds
-
getWriteIdleTime
public long getWriteIdleTime()
Description copied from interface:IoSessionManagerMBeanwrite IDLE time- Specified by:
getWriteIdleTimein interfaceIoSessionManagerMBean- Returns:
- write idle time in milli-seconds
-
getBothIdleTime
public long getBothIdleTime()
Description copied from interface:IoSessionManagerMBeanread and write IDLE time- Specified by:
getBothIdleTimein interfaceIoSessionManagerMBean- Returns:
- idle time in milli-seconds
-
getByteReadThroughtput
public float getByteReadThroughtput()
Description copied from interface:IoSessionManagerMBeanget the read bytes per second throughput works only if a stat collector is inspecting this session,- Specified by:
getByteReadThroughtputin interfaceIoSessionManagerMBean- Returns:
- read bytes per seconds
-
getByteWrittenThroughtput
public float getByteWrittenThroughtput()
Description copied from interface:IoSessionManagerMBeanget the written bytes per second throughput works only if a stat collector is inspecting this session,- Specified by:
getByteWrittenThroughtputin interfaceIoSessionManagerMBean- Returns:
- written bytes per seconds
-
getMessageReadThroughtput
public float getMessageReadThroughtput()
Description copied from interface:IoSessionManagerMBeanget the read messages per second throughput works only if a stat collector is inspecting this session, and only if a ProtocolDecoderFilter is used- Specified by:
getMessageReadThroughtputin interfaceIoSessionManagerMBean- Returns:
- read messages per seconds
-
getMessageWrittenThroughtput
public float getMessageWrittenThroughtput()
Description copied from interface:IoSessionManagerMBeanget the written messages per second throughput works only if a stat collector is inspecting this session, and only if a ProtocolDecoderFilter is used- Specified by:
getMessageWrittenThroughtputin interfaceIoSessionManagerMBean- Returns:
- written messages per seconds
-
-