com.sun.grizzly.http
Class DefaultProtocolFilter

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

public class DefaultProtocolFilter
extends Object
implements ProtocolFilter

Default ProtocolFilter implementation, that allows HTTP request processing.

Author:
Jeanfrancois Arcand

Field Summary
protected  InetAddress address
          The current address.
protected  Class algorithmClass
          The StreamAlgorithm class.
protected static Logger logger
          Logger
protected  int port
          The current TCP port.
 
Fields inherited from interface com.sun.grizzly.ProtocolFilter
SUCCESSFUL_READ
 
Constructor Summary
DefaultProtocolFilter(Class algorithmClass, InetAddress address, int port)
           Constructs a new DefaultProtocolFilter/
DefaultProtocolFilter(Class algorithmClass, int port)
          Deprecated. call DefaultProtocolFilter(Class, java.net.InetAddress, int)
 
Method Summary
protected  void configureInputBuffer(InputReader inputStream, Context context, HttpWorkerThread workerThread)
          Configure InputReader.
protected  void configureProcessorTask(ProcessorTask processorTask, Context context, StreamAlgorithm streamAlgorithm)
          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

algorithmClass

protected Class algorithmClass
The StreamAlgorithm class.


port

protected int port
The current TCP port.


address

protected InetAddress address
The current address.


logger

protected static final Logger logger
Logger

Constructor Detail

DefaultProtocolFilter

@Deprecated
public DefaultProtocolFilter(Class algorithmClass,
                                        int port)
Deprecated. call DefaultProtocolFilter(Class, java.net.InetAddress, int)

Invokes DefaultProtocolFilter(Class, java.net.InetAddress, int).

Parameters:
algorithmClass - the StreamAlgorithm
port - the network port to associate with this filter

DefaultProtocolFilter

public DefaultProtocolFilter(Class algorithmClass,
                             InetAddress address,
                             int port)

Constructs a new DefaultProtocolFilter/

Parameters:
algorithmClass - the StreamAlgorithm
address - the network address to associate with this filter
port - the network port to associate with this filter
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,
                                      StreamAlgorithm streamAlgorithm)
Configure ProcessorTask.


configureInputBuffer

protected void configureInputBuffer(InputReader inputStream,
                                    Context context,
                                    HttpWorkerThread workerThread)
Configure InputReader.


isSecure

protected boolean isSecure()
Is ProtocolFilter secured

Returns:
is ProtocolFilter secured


Copyright © 2012 Oracle Corporation. All Rights Reserved.