org.apache.mina.integration.jmx
Class IoSessionManager

java.lang.Object
  extended byorg.apache.mina.integration.jmx.IoSessionManager
All Implemented Interfaces:
IoSessionManagerMBean

public class IoSessionManager
extends Object
implements IoSessionManagerMBean

Version:
$Rev: 441336 $, $Date: 2006-09-08 04:11:33 +0200 (Fri, 08 Sep 2006) $
Author:
The Apache Directory Project (mina-dev@directory.apache.org)

Constructor Summary
IoSessionManager(IoSession session)
          create the session manager
 
Method Summary
 void addFirstLoggingFilter()
          add a logging filter at begining of the chain
 void addLastLoggingFilter()
          add a logging filter at end of the chain
 void close()
          close the session
 long getBothIdleTime()
          read and write IDLE time
 float 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,
 Date getCreationTime()
          when the session was created
 String[] getInstalledFilters()
          get the list of filters installed in the filter chain
 Date getLastIoTime()
          last time the session processed an IO
 Date getLastReadTime()
          last time the session processed an read
 Date getLastWriteTime()
          last time the session processed a write
 float getMessageReadThroughtput()
          get the read messages per second throughput works only if a stat collector is inspecting this session, and only if a ProtocolDecoderFilter is used
 float getMessageWrittenThroughtput()
          get the written messages per second throughput works only if a stat collector is inspecting this session, and only if a ProtocolDecoderFilter is used
 long getReadBytes()
          bytes read from the beginning
 long getReadIdleTime()
          read IDLE time
 long getReadMessages()
          PDU decoded from the beginning.
 long getWriteIdleTime()
          write IDLE time
 long getWrittenBytes()
          bytes written from the beginning
 long getWrittenMessages()
          PDU encoded from the beginning.
 boolean isConnected()
          is the session is connected
 void removeFirstLoggingFilter()
          remove the logging filter at begining of the chain
 void removeLastLoggingFilter()
          remove the logging filter at end of the chain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IoSessionManager

public IoSessionManager(IoSession session)
create the session manager

Parameters:
session - the MINA's session to manage
Method Detail

isConnected

public boolean isConnected()
Description copied from interface: IoSessionManagerMBean
is the session is connected

Specified by:
isConnected in interface IoSessionManagerMBean
Returns:
connection status
See Also:
archean.util.mina.IoSessionManagerMBean#isConnected()

getReadBytes

public long getReadBytes()
Description copied from interface: IoSessionManagerMBean
bytes read from the beginning

Specified by:
getReadBytes in interface IoSessionManagerMBean
Returns:
total of bytes read
See Also:
archean.util.mina.IoSessionManagerMBean#getReadBytes()

getWrittenBytes

public long getWrittenBytes()
Description copied from interface: IoSessionManagerMBean
bytes written from the beginning

Specified by:
getWrittenBytes in interface IoSessionManagerMBean
Returns:
total of bytes written
See Also:
archean.util.mina.IoSessionManagerMBean#getWrittenBytes()

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 interface IoSessionManagerMBean
Returns:

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 interface IoSessionManagerMBean
Returns:

close

public void close()
Description copied from interface: IoSessionManagerMBean
close the session

Specified by:
close in interface IoSessionManagerMBean
See Also:
archean.util.mina.IoSessionManagerMBean#close()

getCreationTime

public Date getCreationTime()
Description copied from interface: IoSessionManagerMBean
when the session was created

Specified by:
getCreationTime in interface IoSessionManagerMBean
Returns:
the date of session creation
See Also:
archean.util.mina.IoSessionManagerMBean#getCreationTime()

getLastIoTime

public Date getLastIoTime()
Description copied from interface: IoSessionManagerMBean
last time the session processed an IO

Specified by:
getLastIoTime in interface IoSessionManagerMBean
Returns:
date of last IO
See Also:
archean.util.mina.IoSessionManagerMBean#getLastIoTime()

getLastReadTime

public Date getLastReadTime()
Description copied from interface: IoSessionManagerMBean
last time the session processed an read

Specified by:
getLastReadTime in interface IoSessionManagerMBean
Returns:
date of last read
See Also:
archean.util.mina.IoSessionManagerMBean#getLastReadTime()

getLastWriteTime

public Date getLastWriteTime()
Description copied from interface: IoSessionManagerMBean
last time the session processed a write

Specified by:
getLastWriteTime in interface IoSessionManagerMBean
Returns:
date of last write
See Also:
archean.util.mina.IoSessionManagerMBean#getLastWriteTime()

getInstalledFilters

public String[] getInstalledFilters()
Description copied from interface: IoSessionManagerMBean
get the list of filters installed in the filter chain

Specified by:
getInstalledFilters in interface IoSessionManagerMBean
Returns:
array of filter names
See Also:
archean.util.mina.IoSessionManagerMBean#getInstalledFilters()

addLastLoggingFilter

public void addLastLoggingFilter()
Description copied from interface: IoSessionManagerMBean
add a logging filter at end of the chain

Specified by:
addLastLoggingFilter in interface IoSessionManagerMBean
See Also:
archean.util.mina.IoSessionManagerMBean#addLastLoggingFilter()

removeLastLoggingFilter

public void removeLastLoggingFilter()
Description copied from interface: IoSessionManagerMBean
remove the logging filter at end of the chain

Specified by:
removeLastLoggingFilter in interface IoSessionManagerMBean
See Also:
archean.util.mina.IoSessionManagerMBean#removeLastLoggingFilter()

addFirstLoggingFilter

public void addFirstLoggingFilter()
Description copied from interface: IoSessionManagerMBean
add a logging filter at begining of the chain

Specified by:
addFirstLoggingFilter in interface IoSessionManagerMBean
See Also:
archean.util.mina.IoSessionManagerMBean#addFirstLoggingFilter()

removeFirstLoggingFilter

public void removeFirstLoggingFilter()
Description copied from interface: IoSessionManagerMBean
remove the logging filter at begining of the chain

Specified by:
removeFirstLoggingFilter in interface IoSessionManagerMBean

getReadIdleTime

public long getReadIdleTime()
Description copied from interface: IoSessionManagerMBean
read IDLE time

Specified by:
getReadIdleTime in interface IoSessionManagerMBean
Returns:
read idle time in milli-seconds
See Also:
archean.util.mina.IoSessionManagerMBean#getReadIdleTime()

getWriteIdleTime

public long getWriteIdleTime()
Description copied from interface: IoSessionManagerMBean
write IDLE time

Specified by:
getWriteIdleTime in interface IoSessionManagerMBean
Returns:
write idle time in milli-seconds
See Also:
archean.util.mina.IoSessionManagerMBean#getWriteIdleTime()

getBothIdleTime

public long getBothIdleTime()
Description copied from interface: IoSessionManagerMBean
read and write IDLE time

Specified by:
getBothIdleTime in interface IoSessionManagerMBean
Returns:
idle time in milli-seconds
See Also:
archean.util.mina.IoSessionManagerMBean#getBothIdleTime()

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 interface IoSessionManagerMBean
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 interface IoSessionManagerMBean
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 interface IoSessionManagerMBean
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 interface IoSessionManagerMBean
Returns:
written messages per seconds