Package org.apache.mina.integration.jmx
Class IoSessionManager
java.lang.Object
org.apache.mina.integration.jmx.IoSessionManager
- All Implemented Interfaces:
IoSessionManagerMBean
-
Constructor Summary
ConstructorsConstructorDescriptionIoSessionManager(org.apache.mina.common.IoSession session) create the session manager -
Method Summary
Modifier and TypeMethodDescriptionvoidadd a logging filter at begining of the chainvoidadd a logging filter at end of the chainvoidclose()close the sessionlongread and write IDLE timefloatget the read bytes per second throughput works only if a stat collector is inspecting this session,floatget the written bytes per second throughput works only if a stat collector is inspecting this session,when the session was createdString[]get the list of filters installed in the filter chainlast time the session processed an IOlast time the session processed an readlast time the session processed a writefloatget the read messages per second throughput works only if a stat collector is inspecting this session, and only if a ProtocolDecoderFilter is usedfloatget the written messages per second throughput works only if a stat collector is inspecting this session, and only if a ProtocolDecoderFilter is usedlongbytes read from the beginninglongread IDLE timelongPDU decoded from the beginning.longwrite IDLE timelongbytes written from the beginninglongPDU encoded from the beginning.booleanis the session is connectedvoidremove the logging filter at begining of the chainvoidremove the logging filter at end of the chain
-
Constructor Details
-
IoSessionManager
public IoSessionManager(org.apache.mina.common.IoSession session) create the session manager- Parameters:
session- the MINA's session to manage
-
-
Method Details
-
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
Description copied from interface:IoSessionManagerMBeanclose the session- Specified by:
closein interfaceIoSessionManagerMBean- Throws:
InterruptedException
-
getCreationTime
Description copied from interface:IoSessionManagerMBeanwhen the session was created- Specified by:
getCreationTimein interfaceIoSessionManagerMBean- Returns:
- the date of session creation
-
getLastIoTime
Description copied from interface:IoSessionManagerMBeanlast time the session processed an IO- Specified by:
getLastIoTimein interfaceIoSessionManagerMBean- Returns:
- date of last IO
-
getLastReadTime
Description copied from interface:IoSessionManagerMBeanlast time the session processed an read- Specified by:
getLastReadTimein interfaceIoSessionManagerMBean- Returns:
- date of last read
-
getLastWriteTime
Description copied from interface:IoSessionManagerMBeanlast time the session processed a write- Specified by:
getLastWriteTimein interfaceIoSessionManagerMBean- Returns:
- date of last write
-
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
-