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 TypeMethodDescriptionvoid
add a logging filter at begining of the chainvoid
add a logging filter at end of the chainvoid
close()
close the sessionlong
read and write IDLE timefloat
get the read bytes per second throughput works only if a stat collector is inspecting this session,float
get 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 writefloat
get the read messages per second throughput works only if a stat collector is inspecting this session, and only if a ProtocolDecoderFilter is usedfloat
get the written messages per second throughput works only if a stat collector is inspecting this session, and only if a ProtocolDecoderFilter is usedlong
bytes read from the beginninglong
read IDLE timelong
PDU decoded from the beginning.long
write IDLE timelong
bytes written from the beginninglong
PDU encoded from the beginning.boolean
is the session is connectedvoid
remove the logging filter at begining of the chainvoid
remove 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:IoSessionManagerMBean
is the session is connected- Specified by:
isConnected
in interfaceIoSessionManagerMBean
- Returns:
- connection status
-
getReadBytes
public long getReadBytes()Description copied from interface:IoSessionManagerMBean
bytes read from the beginning- Specified by:
getReadBytes
in interfaceIoSessionManagerMBean
- Returns:
- total of bytes read
-
getWrittenBytes
public long getWrittenBytes()Description copied from interface:IoSessionManagerMBean
bytes written from the beginning- Specified by:
getWrittenBytes
in interfaceIoSessionManagerMBean
- Returns:
- total of bytes written
-
getReadMessages
public long getReadMessages()Description copied from interface:IoSessionManagerMBean
PDU decoded from the beginning. Only revelent if a ProtocolCodecFilter is installed.- Specified by:
getReadMessages
in interfaceIoSessionManagerMBean
- Returns:
- Number of read messages
-
getWrittenMessages
public long getWrittenMessages()Description copied from interface:IoSessionManagerMBean
PDU encoded from the beginning. Only revelent if a ProtocolCodecFilter is installed.- Specified by:
getWrittenMessages
in interfaceIoSessionManagerMBean
- Returns:
- Number of written messages
-
close
Description copied from interface:IoSessionManagerMBean
close the session- Specified by:
close
in interfaceIoSessionManagerMBean
- Throws:
InterruptedException
-
getCreationTime
Description copied from interface:IoSessionManagerMBean
when the session was created- Specified by:
getCreationTime
in interfaceIoSessionManagerMBean
- Returns:
- the date of session creation
-
getLastIoTime
Description copied from interface:IoSessionManagerMBean
last time the session processed an IO- Specified by:
getLastIoTime
in interfaceIoSessionManagerMBean
- Returns:
- date of last IO
-
getLastReadTime
Description copied from interface:IoSessionManagerMBean
last time the session processed an read- Specified by:
getLastReadTime
in interfaceIoSessionManagerMBean
- Returns:
- date of last read
-
getLastWriteTime
Description copied from interface:IoSessionManagerMBean
last time the session processed a write- Specified by:
getLastWriteTime
in interfaceIoSessionManagerMBean
- Returns:
- date of last write
-
getInstalledFilters
Description copied from interface:IoSessionManagerMBean
get the list of filters installed in the filter chain- Specified by:
getInstalledFilters
in interfaceIoSessionManagerMBean
- Returns:
- array of filter names
-
addLastLoggingFilter
public void addLastLoggingFilter()Description copied from interface:IoSessionManagerMBean
add a logging filter at end of the chain- Specified by:
addLastLoggingFilter
in interfaceIoSessionManagerMBean
-
removeLastLoggingFilter
public void removeLastLoggingFilter()Description copied from interface:IoSessionManagerMBean
remove the logging filter at end of the chain- Specified by:
removeLastLoggingFilter
in interfaceIoSessionManagerMBean
-
addFirstLoggingFilter
public void addFirstLoggingFilter()Description copied from interface:IoSessionManagerMBean
add a logging filter at begining of the chain- Specified by:
addFirstLoggingFilter
in interfaceIoSessionManagerMBean
-
removeFirstLoggingFilter
public void removeFirstLoggingFilter()Description copied from interface:IoSessionManagerMBean
remove the logging filter at begining of the chain- Specified by:
removeFirstLoggingFilter
in interfaceIoSessionManagerMBean
-
getReadIdleTime
public long getReadIdleTime()Description copied from interface:IoSessionManagerMBean
read IDLE time- Specified by:
getReadIdleTime
in interfaceIoSessionManagerMBean
- Returns:
- read idle time in milli-seconds
-
getWriteIdleTime
public long getWriteIdleTime()Description copied from interface:IoSessionManagerMBean
write IDLE time- Specified by:
getWriteIdleTime
in interfaceIoSessionManagerMBean
- Returns:
- write idle time in milli-seconds
-
getBothIdleTime
public long getBothIdleTime()Description copied from interface:IoSessionManagerMBean
read and write IDLE time- Specified by:
getBothIdleTime
in interfaceIoSessionManagerMBean
- Returns:
- idle time in milli-seconds
-
getByteReadThroughtput
public float getByteReadThroughtput()Description copied from interface:IoSessionManagerMBean
get the read bytes per second throughput works only if a stat collector is inspecting this session,- Specified by:
getByteReadThroughtput
in interfaceIoSessionManagerMBean
- Returns:
- read bytes per seconds
-
getByteWrittenThroughtput
public float getByteWrittenThroughtput()Description copied from interface:IoSessionManagerMBean
get the written bytes per second throughput works only if a stat collector is inspecting this session,- Specified by:
getByteWrittenThroughtput
in interfaceIoSessionManagerMBean
- Returns:
- written bytes per seconds
-
getMessageReadThroughtput
public float getMessageReadThroughtput()Description copied from interface:IoSessionManagerMBean
get 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:
getMessageReadThroughtput
in interfaceIoSessionManagerMBean
- Returns:
- read messages per seconds
-
getMessageWrittenThroughtput
public float getMessageWrittenThroughtput()Description copied from interface:IoSessionManagerMBean
get 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:
getMessageWrittenThroughtput
in interfaceIoSessionManagerMBean
- Returns:
- written messages per seconds
-