com.sun.grizzly.filter
Class LogFilter

java.lang.Object
  extended by com.sun.grizzly.filter.LogFilter
All Implemented Interfaces:
ProtocolFilter

public class LogFilter
extends Object
implements ProtocolFilter

Simple filter that log that output the bytes read. This filter should be used for debugging purpose only.

Author:
Jeanfrancois Arcand

Field Summary
 
Fields inherited from interface com.sun.grizzly.ProtocolFilter
SUCCESSFUL_READ
 
Constructor Summary
LogFilter()
           
 
Method Summary
 boolean execute(Context ctx)
          Execute a unit of processing work to be performed.
 boolean postExecute(Context ctx)
          Execute any cleanup activities, such as releasing resources that were acquired during the execute() method of this ProtocolFilter instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogFilter

public LogFilter()
Method Detail

execute

public boolean execute(Context ctx)
                throws IOException
Description copied from interface: ProtocolFilter
Execute a unit of processing work to be performed. This ProtocolFilter may either complete the required processing and return false, or delegate remaining processing to the next ProtocolFilter in a ProtocolChain containing this ProtocolFilter by returning true.

Specified by:
execute in interface ProtocolFilter
Parameters:
ctx - Context
Returns:
Throws:
IOException

postExecute

public boolean postExecute(Context ctx)
                    throws IOException
Description copied from interface: ProtocolFilter
Execute any cleanup activities, such as releasing resources that were acquired during the execute() method of this ProtocolFilter instance.

Specified by:
postExecute in interface ProtocolFilter
Parameters:
ctx - Context
Returns:
Throws:
IOException


Copyright © 2011 SUN Microsystems. All Rights Reserved.