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 void
addFirstLoggingFilter()
add a logging filter at begining of the chainvoid
addLastLoggingFilter()
add a logging filter at end of the chainvoid
close()
close the sessionlong
getBothIdleTime()
read and write IDLE timefloat
getByteReadThroughtput()
get the read bytes per second throughput works only if a stat collector is inspecting this session,float
getByteWrittenThroughtput()
get the written bytes per second throughput works only if a stat collector is inspecting this session,java.util.Date
getCreationTime()
when the session was createdjava.lang.String[]
getInstalledFilters()
get the list of filters installed in the filter chainjava.util.Date
getLastIoTime()
last time the session processed an IOjava.util.Date
getLastReadTime()
last time the session processed an readjava.util.Date
getLastWriteTime()
last time the session processed a writefloat
getMessageReadThroughtput()
get the read messages per second throughput works only if a stat collector is inspecting this session, and only if a ProtocolDecoderFilter is usedfloat
getMessageWrittenThroughtput()
get the written messages per second throughput works only if a stat collector is inspecting this session, and only if a ProtocolDecoderFilter is usedlong
getReadBytes()
bytes read from the beginninglong
getReadIdleTime()
read IDLE timelong
getReadMessages()
PDU decoded from the beginning.long
getWriteIdleTime()
write IDLE timelong
getWrittenBytes()
bytes written from the beginninglong
getWrittenMessages()
PDU encoded from the beginning.boolean
isConnected()
is the session is connectedvoid
removeFirstLoggingFilter()
remove the logging filter at begining of the chainvoid
removeLastLoggingFilter()
remove the logging filter at end of the chain
-
-
-
Method Detail
-
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
public void close() throws java.lang.InterruptedException
Description copied from interface:IoSessionManagerMBean
close the session- Specified by:
close
in interfaceIoSessionManagerMBean
- Throws:
java.lang.InterruptedException
-
getCreationTime
public java.util.Date getCreationTime()
Description copied from interface:IoSessionManagerMBean
when the session was created- Specified by:
getCreationTime
in interfaceIoSessionManagerMBean
- Returns:
- the date of session creation
-
getLastIoTime
public java.util.Date getLastIoTime()
Description copied from interface:IoSessionManagerMBean
last time the session processed an IO- Specified by:
getLastIoTime
in interfaceIoSessionManagerMBean
- Returns:
- date of last IO
-
getLastReadTime
public java.util.Date getLastReadTime()
Description copied from interface:IoSessionManagerMBean
last time the session processed an read- Specified by:
getLastReadTime
in interfaceIoSessionManagerMBean
- Returns:
- date of last read
-
getLastWriteTime
public java.util.Date getLastWriteTime()
Description copied from interface:IoSessionManagerMBean
last time the session processed a write- Specified by:
getLastWriteTime
in interfaceIoSessionManagerMBean
- Returns:
- date of last write
-
getInstalledFilters
public java.lang.String[] 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
-
-