net.tomp2p.connection
Class PerformanceFilter

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelHandler
      extended by net.tomp2p.connection.PerformanceFilter
All Implemented Interfaces:
org.jboss.netty.channel.ChannelDownstreamHandler, org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler

@ChannelHandler.Sharable
public class PerformanceFilter
extends org.jboss.netty.channel.SimpleChannelHandler

Measures the number of outgoing and incoming packets. This is used to test the performance. The logger is set to debug and will only output if the msg/s is larger than 1. To enable the performance, set in tomp2plog.properties "net.tomp2p.connection.PerformanceFilter.level = FINE"

Author:
Thomas Bocek

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Constructor Summary
PerformanceFilter()
           
 
Method Summary
 void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)
           
 void writeRequested(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)
           
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelHandler
bindRequested, channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, exceptionCaught, handleDownstream, handleUpstream, setInterestOpsRequested, unbindRequested, writeComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerformanceFilter

public PerformanceFilter()
Method Detail

messageReceived

public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.MessageEvent e)
Overrides:
messageReceived in class org.jboss.netty.channel.SimpleChannelHandler

writeRequested

public void writeRequested(org.jboss.netty.channel.ChannelHandlerContext ctx,
                           org.jboss.netty.channel.MessageEvent e)
                    throws Exception
Overrides:
writeRequested in class org.jboss.netty.channel.SimpleChannelHandler
Throws:
Exception


Copyright © 2013. All Rights Reserved.