directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvermill...@apache.org
Subject svn commit: r441073 - in /directory/trunks/mina/jmx/src/main/java/org: ./ apache/ apache/mina/ apache/mina/integration/ apache/mina/integration/jmx/
Date Thu, 07 Sep 2006 12:34:06 GMT
Author: jvermillard
Date: Thu Sep  7 05:34:05 2006
New Revision: 441073

URL: http://svn.apache.org/viewvc?view=rev&rev=441073
Log:
JMX integration module for MINA

Added:
    directory/trunks/mina/jmx/src/main/java/org/
    directory/trunks/mina/jmx/src/main/java/org/apache/
    directory/trunks/mina/jmx/src/main/java/org/apache/mina/
    directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/
    directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/
    directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoServiceManager.java
    directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoServiceManagerMBean.java
    directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoSessionManager.java
    directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoSessionManagerMBean.java

Added: directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoServiceManager.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoServiceManager.java?view=auto&rev=441073
==============================================================================
--- directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoServiceManager.java
(added)
+++ directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoServiceManager.java
Thu Sep  7 05:34:05 2006
@@ -0,0 +1,252 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.mina.integration.jmx;
+
+
+import java.net.SocketAddress;
+import java.util.Iterator;
+
+import org.apache.mina.common.IoHandler;
+import org.apache.mina.common.IoService;
+import org.apache.mina.common.IoServiceConfig;
+import org.apache.mina.common.IoServiceListener;
+import org.apache.mina.common.IoSession;
+import org.apache.mina.management.IoSessionStat;
+import org.apache.mina.management.StatCollector;
+
+
+/**
+ * @author The Apache Directory Project (mina-dev@directory.apache.org)
+ */
+public class IoServiceManager implements IoServiceManagerMBean
+{
+    private IoService service;
+
+    private StatCollector collector = null;
+
+
+    public IoServiceManager( IoService service )
+    {
+        this.service = service;
+    }
+
+
+    public int getManagedSessionCount()
+    {
+
+        int count = 0;
+        for ( Iterator iter = service.getManagedServiceAddresses().iterator(); iter.hasNext();
)
+        {
+            SocketAddress element = ( SocketAddress ) iter.next();
+
+            count += service.getManagedSessions( element ).size();
+        }
+        return count;
+    }
+
+
+    public void startCollectingStats( int millisecondsPolling )
+    {
+        if ( collector != null && collector.isRunning() )
+        {
+            throw new RuntimeException( "Already collecting stats" );
+        }
+
+        collector = new StatCollector( service, millisecondsPolling );
+        collector.start();
+
+    }
+
+
+    public void stopCollectingStats()
+    {
+        if ( collector != null && collector.isRunning() )
+            collector.stop();
+
+    }
+
+
+    public float getTotalByteReadThroughput()
+    {
+        float total = 0;
+        for ( Iterator iter = service.getManagedServiceAddresses().iterator(); iter.hasNext();
)
+        {
+            SocketAddress element = ( SocketAddress ) iter.next();
+
+            for ( Iterator iter2 = service.getManagedSessions( element ).iterator(); iter2.hasNext();
)
+            {
+                IoSession session = ( IoSession ) iter2.next();
+                total += ( ( IoSessionStat ) session.getAttribute( StatCollector.STAT_ID
) )
+                    .getByteReadThroughput();
+            }
+        }
+        return total;
+    }
+
+
+    public float getTotalByteWrittenThroughput()
+    {
+        float total = 0;
+        for ( Iterator iter = service.getManagedServiceAddresses().iterator(); iter.hasNext();
)
+        {
+            SocketAddress element = ( SocketAddress ) iter.next();
+
+            for ( Iterator iter2 = service.getManagedSessions( element ).iterator(); iter2.hasNext();
)
+            {
+                IoSession session = ( IoSession ) iter2.next();
+                total += ( ( IoSessionStat ) session.getAttribute( StatCollector.STAT_ID
) )
+                    .getByteWrittenThroughput();
+            }
+        }
+        return total;
+    }
+
+
+    public float getTotalMessageReadThroughput()
+    {
+        float total = 0;
+        for ( Iterator iter = service.getManagedServiceAddresses().iterator(); iter.hasNext();
)
+        {
+            SocketAddress element = ( SocketAddress ) iter.next();
+
+            for ( Iterator iter2 = service.getManagedSessions( element ).iterator(); iter2.hasNext();
)
+            {
+                IoSession session = ( IoSession ) iter2.next();
+                total += ( ( IoSessionStat ) session.getAttribute( StatCollector.STAT_ID
) )
+                    .getMessageReadThroughput();
+            }
+        }
+        return total;
+    }
+
+
+    public float getTotalMessageWrittenThroughput()
+    {
+        float total = 0;
+        for ( Iterator iter = service.getManagedServiceAddresses().iterator(); iter.hasNext();
)
+        {
+            SocketAddress element = ( SocketAddress ) iter.next();
+
+            for ( Iterator iter2 = service.getManagedSessions( element ).iterator(); iter2.hasNext();
)
+            {
+                IoSession session = ( IoSession ) iter2.next();
+                total += ( ( IoSessionStat ) session.getAttribute( StatCollector.STAT_ID
) )
+                    .getMessageWrittenThroughput();
+            }
+        }
+        return total;
+    }
+
+
+    public float getAverageByteReadThroughput()
+    {
+        float total = 0;
+        int count = 0;
+        for ( Iterator iter = service.getManagedServiceAddresses().iterator(); iter.hasNext();
)
+        {
+            SocketAddress element = ( SocketAddress ) iter.next();
+
+            for ( Iterator iter2 = service.getManagedSessions( element ).iterator(); iter2.hasNext();
)
+            {
+                IoSession session = ( IoSession ) iter2.next();
+                total += ( ( IoSessionStat ) session.getAttribute( StatCollector.STAT_ID
) )
+                    .getByteReadThroughput();
+                count++;
+            }
+        }
+        return total / count;
+    }
+
+
+    public float getAverageByteWrittenThroughput()
+    {
+        float total = 0;
+        int count = 0;
+        for ( Iterator iter = service.getManagedServiceAddresses().iterator(); iter.hasNext();
)
+        {
+            SocketAddress element = ( SocketAddress ) iter.next();
+
+            for ( Iterator iter2 = service.getManagedSessions( element ).iterator(); iter2.hasNext();
)
+            {
+                IoSession session = ( IoSession ) iter2.next();
+                total += ( ( IoSessionStat ) session.getAttribute( StatCollector.STAT_ID
) )
+                    .getByteWrittenThroughput();
+                count++;
+            }
+        }
+        return total / count;
+    }
+
+
+    public float getAverageMessageReadThroughput()
+    {
+        float total = 0;
+        int count = 0;
+        for ( Iterator iter = service.getManagedServiceAddresses().iterator(); iter.hasNext();
)
+        {
+            SocketAddress element = ( SocketAddress ) iter.next();
+
+            for ( Iterator iter2 = service.getManagedSessions( element ).iterator(); iter2.hasNext();
)
+            {
+                IoSession session = ( IoSession ) iter2.next();
+                total += ( ( IoSessionStat ) session.getAttribute( StatCollector.STAT_ID
) )
+                    .getMessageReadThroughput();
+                count++;
+            }
+        }
+        return total / count;
+    }
+
+
+    public float getAverageMessageWrittenThroughput()
+    {
+        float total = 0;
+        int count = 0;
+        for ( Iterator iter = service.getManagedServiceAddresses().iterator(); iter.hasNext();
)
+        {
+            SocketAddress element = ( SocketAddress ) iter.next();
+
+            for ( Iterator iter2 = service.getManagedSessions( element ).iterator(); iter2.hasNext();
)
+            {
+                IoSession session = ( IoSession ) iter2.next();
+                total += ( ( IoSessionStat ) session.getAttribute( StatCollector.STAT_ID
) )
+                    .getMessageWrittenThroughput();
+                count++;
+            }
+        }
+        return total / count;
+    }
+
+
+    public void closeAllSessions()
+    {
+        for ( Iterator iter = service.getManagedServiceAddresses().iterator(); iter.hasNext();
)
+        {
+            SocketAddress element = ( SocketAddress ) iter.next();
+
+            for ( Iterator iter2 = service.getManagedSessions( element ).iterator(); iter2.hasNext();
)
+            {
+                IoSession session = ( IoSession ) iter2.next();
+                session.close();
+            }
+        }
+
+    }
+}

Added: directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoServiceManagerMBean.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoServiceManagerMBean.java?view=auto&rev=441073
==============================================================================
--- directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoServiceManagerMBean.java
(added)
+++ directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoServiceManagerMBean.java
Thu Sep  7 05:34:05 2006
@@ -0,0 +1,97 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.mina.integration.jmx;
+
+/**
+ * @author The Apache Directory Project (mina-dev@directory.apache.org)
+ */
+public interface IoServiceManagerMBean
+{
+    /**
+     * amount of session currently managed
+     * @return session count
+     */
+    int getManagedSessionCount();
+    
+    /**
+     * start collecting throughput statistics for all the managed sessions 
+     * @param millisecondsPolling polling time in milliseconds like 5000 for computing throughput
every 5 seconds
+     */
+    void startCollectingStats(int millisecondsPolling);
+    
+    /**
+     * stop collecting throughput statistics 
+     */
+    void stopCollectingStats();
+    
+    /**
+     * bytes read per seconds sum of all the managed sessions  
+     * @return bytes per seconds
+     */
+    float getTotalByteReadThroughput();
+    
+    /**
+     * bytes written per seconds sum for all the managed sessions  
+     * @return bytes per seconds
+     */
+    float getTotalByteWrittenThroughput();
+
+    /**
+     * messages read per seconds sum of all the managed sessions  
+     * @return messages per seconds
+     */
+    float getTotalMessageReadThroughput();
+
+    /**
+     * messages written per seconds sum for all the managed sessions  
+     * @return messages per seconds
+     */
+    float getTotalMessageWrittenThroughput();
+
+    /**
+     * average bytes read per seconds for all the managed sessions  
+     * @return bytes per seconds
+     */
+    float getAverageByteReadThroughput();
+
+    /**
+     * average bytes written per seconds for all the managed sessions  
+     * @return bytes per seconds
+     */
+    float getAverageByteWrittenThroughput();
+    
+    /**
+     * average messages read per seconds for all the managed sessions  
+     * @return messages per seconds
+     */
+    float getAverageMessageReadThroughput();
+    
+    /**
+     * average messages written per seconds for all the managed sessions  
+     * @return messages per seconds
+     */
+    float getAverageMessageWrittenThroughput();
+
+    /**
+     * close all the managed sessions
+     */
+    void closeAllSessions();
+
+}
\ No newline at end of file

Added: directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoSessionManager.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoSessionManager.java?view=auto&rev=441073
==============================================================================
--- directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoSessionManager.java
(added)
+++ directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoSessionManager.java
Thu Sep  7 05:34:05 2006
@@ -0,0 +1,257 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.mina.integration.jmx;
+
+
+import java.util.Date;
+import java.util.List;
+
+
+import org.apache.mina.common.IdleStatus;
+import org.apache.mina.common.IoFilterChain;
+import org.apache.mina.common.IoSession;
+import org.apache.mina.common.support.BaseIoSession;
+import org.apache.mina.filter.LoggingFilter;
+import org.apache.mina.management.IoSessionStat;
+import org.apache.mina.management.StatCollector;
+
+
+/**
+ * @author The Apache Directory Project (mina-dev@directory.apache.org)
+ */
+public class IoSessionManager implements IoSessionManagerMBean
+{
+
+    private IoSession session;
+
+
+    /**
+     * create the session manager
+     * @param session the MINA's session to manage
+     */
+    public IoSessionManager( IoSession session )
+    {
+        this.session = session;
+    }
+
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#isConnected()
+     */
+    public boolean isConnected()
+    {
+        return session.isConnected();
+    }
+
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#getReadBytes()
+     */
+    public long getReadBytes()
+    {
+        return session.getReadBytes();
+    }
+
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#getWrittenBytes()
+     */
+    public long getWrittenBytes()
+    {
+        return session.getWrittenBytes();
+    }
+
+
+    public long getReadMessages()
+    {
+        return ( ( BaseIoSession ) session ).getReadMessages();
+    }
+
+
+    public long getWrittenMessages()
+    {
+        return ( ( BaseIoSession ) session ).getWrittenMessages();
+    }
+
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#close()
+     */
+    public void close()
+    {
+        session.close().join();
+    }
+
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#getCreationTime()
+     */
+    public Date getCreationTime()
+    {
+        return new Date( session.getCreationTime() );
+    }
+
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#getLastIoTime()
+     */
+    public Date getLastIoTime()
+    {
+        return new Date( session.getLastIoTime() );
+    }
+
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#getLastReadTime()
+     */
+    public Date getLastReadTime()
+    {
+        return new Date( session.getLastReadTime() );
+    }
+
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#getLastWriteTime()
+     */
+    public Date getLastWriteTime()
+    {
+        return new Date( session.getLastWriteTime() );
+    }
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#getInstalledFilters()
+     */
+    public String[] getInstalledFilters()
+    {
+        List filters = session.getFilterChain().getAll();
+        String[] res = new String[filters.size()];
+        for ( int i = 0; i < res.length; i++ )
+        {
+            res[i] = ( ( IoFilterChain.Entry ) filters.get( i ) ).getName();
+        }
+        return res;
+    }
+
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#addLastLoggingFilter()
+     */
+    public void addLastLoggingFilter()
+    {
+        LoggingFilter f = new LoggingFilter();
+        session.getFilterChain().addLast( "LoggerLast", f );
+    }
+
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#removeLastLoggingFilter()
+     */
+    public void removeLastLoggingFilter()
+    {
+
+        session.getFilterChain().remove( "LoggerLast" );
+    }
+
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#addFirstLoggingFilter()
+     */
+    public void addFirstLoggingFilter()
+    {
+        LoggingFilter f = new LoggingFilter();
+        session.getFilterChain().addFirst( "LoggerFirst", f );
+    }
+
+
+    public void removeFirstLoggingFilter()
+    {
+
+        session.getFilterChain().remove( "LoggerFirst" );
+    }
+
+
+    //  IDLE monitoring
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#getReadIdleTime()
+     */
+    public long getReadIdleTime()
+    {
+        return session.getIdleTimeInMillis( IdleStatus.READER_IDLE );
+    }
+
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#getWriteIdleTime()
+     */
+    public long getWriteIdleTime()
+    {
+        return session.getIdleTimeInMillis( IdleStatus.WRITER_IDLE );
+    }
+
+
+    /**
+     * @see archean.util.mina.IoSessionManagerMBean#getBothIdleTime()
+     */
+    public long getBothIdleTime()
+    {
+        return session.getIdleTimeInMillis( IdleStatus.BOTH_IDLE );
+    }
+
+
+    public float getByteReadThroughtput()
+    {
+        IoSessionStat stats=(IoSessionStat)session.getAttribute(StatCollector.STAT_ID);
+        if(stats==null)
+            return Float.NaN;
+        else
+            return stats.getByteReadThroughput();
+    }
+
+
+    public float getByteWrittenThroughtput()
+    {
+        IoSessionStat stats=(IoSessionStat)session.getAttribute(StatCollector.STAT_ID);
+        if(stats==null)
+            return Float.NaN;
+        else
+            return stats.getByteWrittenThroughput();
+    }
+
+
+    public float getMessageReadThroughtput()
+    {
+        IoSessionStat stats=(IoSessionStat)session.getAttribute(StatCollector.STAT_ID);
+        if(stats==null)
+            return Float.NaN;
+        else
+            return stats.getMessageReadThroughput();
+    }
+
+
+    public float getMessageWrittenThroughtput()
+    {
+        IoSessionStat stats=(IoSessionStat)session.getAttribute(StatCollector.STAT_ID);
+        if(stats==null)
+            return Float.NaN;
+        else
+            return stats.getMessageWrittenThroughput();
+    }
+}

Added: directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoSessionManagerMBean.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoSessionManagerMBean.java?view=auto&rev=441073
==============================================================================
--- directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoSessionManagerMBean.java
(added)
+++ directory/trunks/mina/jmx/src/main/java/org/apache/mina/integration/jmx/IoSessionManagerMBean.java
Thu Sep  7 05:34:05 2006
@@ -0,0 +1,179 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.mina.integration.jmx;
+
+
+import java.util.Date;
+
+
+/**
+ * MBean interface for the session manager, it's used for instrumenting IoSession 
+ * @author The Apache Directory Project (mina-dev@directory.apache.org)
+ */
+public interface IoSessionManagerMBean
+{
+    /**
+     * is the session is connected
+     * @return connection status
+     */
+    public boolean isConnected();
+
+
+    /**
+     * bytes read from the beginning
+     * @return total of bytes read
+     */
+    public long getReadBytes();
+
+
+    /**
+     * bytes written from the beginning
+     * @return total of bytes written
+     */
+    public long getWrittenBytes();
+
+
+    /**
+     * PDU decoded from the beginning. Only revelent if a ProtocolCodecFilter is installed.
+     * @return
+     */
+    public long getReadMessages();
+
+
+    /**
+     * PDU encoded from the beginning. Only revelent if a ProtocolCodecFilter is installed.
+     * @return
+     */
+    public long getWrittenMessages();
+
+
+    /**
+     * close the session
+     */
+    public void close();
+
+
+    /**
+     * when the session was created
+     * @return the date of session creation
+     */
+    public Date getCreationTime();
+
+
+    /**
+     * last time the session processed an IO
+     * @return date of last IO
+     */
+    public Date getLastIoTime();
+
+
+    /**
+     * last time the session processed a write
+     * @return date of last write
+     */
+    public Date getLastWriteTime();
+
+
+    /**
+     * last time the session processed an read
+     * @return date of last read
+     */
+    public Date getLastReadTime();
+
+    /**
+     * get the list of filters installed in the filter chain
+     * @return array of filter names
+     */
+    public String[] getInstalledFilters();
+
+    /**
+     * add a logging filter at end of the chain
+     */
+    public void addLastLoggingFilter();
+
+
+    /**
+     * remove the logging filter at end of the chain
+     */
+    public void removeLastLoggingFilter();
+
+
+    /**
+     * add a logging filter at begining of the chain
+     */
+    public void addFirstLoggingFilter();
+
+
+    /**
+     * remove the logging filter at begining of the chain
+     */
+    public void removeFirstLoggingFilter();
+
+
+    /**
+     * read and write IDLE time
+     * @return idle time in milli-seconds
+     */
+    public long getBothIdleTime();
+
+
+    /**
+     * read IDLE time
+     * @return read idle time in milli-seconds
+     */
+    public long getReadIdleTime();
+
+
+    /**
+     * write IDLE time
+     * @return write idle time in milli-seconds
+     */
+    public long getWriteIdleTime();
+    
+    
+    /**
+     * get the read bytes per second throughput
+     * works only if a stat collector is inspecting this session, 
+     * @return read bytes per seconds
+     */
+    public float getByteReadThroughtput();
+    
+    /**
+     * get the written bytes per second throughput
+     * works only if a stat collector is inspecting this session, 
+     * @return written bytes per seconds
+     */
+    public float getByteWrittenThroughtput();
+    
+    /**
+     * get the read messages per second throughput
+     * works only if a stat collector is inspecting this session, and only if a ProtocolDecoderFilter
is used 
+     * @return read messages per seconds
+     */
+    public float getMessageReadThroughtput();
+
+    /**
+     * get the written messages per second throughput
+     * works only if a stat collector is inspecting this session, and only if a ProtocolDecoderFilter
is used 
+     * @return written messages per seconds
+     */
+    public float getMessageWrittenThroughtput();
+
+}
\ No newline at end of file



Mime
View raw message