com.sun.grizzly.http
Class DefaultProtocolFilter

java.lang.Object
  extended by com.sun.grizzly.http.DefaultProtocolFilter
All Implemented Interfaces:
ProtocolFilter
Direct Known Subclasses:
SSLDefaultProtocolFilter

public class DefaultProtocolFilter
extends Object
implements ProtocolFilter

Default ProtocolFilter implementation, that allows http request processing.

Author:
Jeanfrancois Arcand

Field Summary
protected static Logger logger
          Logger
 
Fields inherited from interface com.sun.grizzly.ProtocolFilter
SUCCESSFUL_READ
 
Constructor Summary
DefaultProtocolFilter(Class algorithmClass, int port)
           
 
Method Summary
protected  void configureByteBufferInputStream(ByteBufferInputStream inputStream, Context context, HttpWorkerThread workerThread)
          Configure ByteBufferInputStream.
protected  void configureProcessorTask(ProcessorTask processorTask, Context context, HttpWorkerThread workerThread, Interceptor handler)
          Configure ProcessorTask.
 boolean execute(Context ctx)
          Execute a unit of processing work to be performed.
protected  boolean isSecure()
          Is ProtocolFilter secured
 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
 

Field Detail

logger

protected static final Logger logger
Logger

Constructor Detail

DefaultProtocolFilter

public DefaultProtocolFilter(Class algorithmClass,
                             int port)
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

configureProcessorTask

protected void configureProcessorTask(ProcessorTask processorTask,
                                      Context context,
                                      HttpWorkerThread workerThread,
                                      Interceptor handler)
Configure ProcessorTask.


configureByteBufferInputStream

protected void configureByteBufferInputStream(ByteBufferInputStream inputStream,
                                              Context context,
                                              HttpWorkerThread workerThread)
Configure ByteBufferInputStream.


isSecure

protected boolean isSecure()
Is ProtocolFilter secured

Returns:
is ProtocolFilter secured


Copyright © 2009 SUN Microsystems. All Rights Reserved.