com.sun.grizzly.portunif
Class FilterChainProtocolHandler

java.lang.Object
  extended by com.sun.grizzly.portunif.FilterChainProtocolHandler
All Implemented Interfaces:
ProtocolHandler
Direct Known Subclasses:
SSLFilterChainProtocolHandler

public class FilterChainProtocolHandler
extends Object
implements ProtocolHandler

ProtocolHandler, which passes PU request processing to a Filter chain.

Author:
Alexey Stashok

Constructor Summary
FilterChainProtocolHandler()
           
 
Method Summary
 boolean expireKey(SelectionKey key)
          Invoked when the SelectorThread is about to expire a SelectionKey.
 ByteBuffer getByteBuffer()
          Returns ByteBuffer, where PUReadFilter will read data
 String[] getProtocols()
          Return an array of protocols supported by this ProtocolHandler.
 boolean handle(Context context, PUProtocolRequest protocolRequest)
          Handle the current request by either redirecting the request to a new port or by delivering the request to the proper endpoint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterChainProtocolHandler

public FilterChainProtocolHandler()
Method Detail

getProtocols

public String[] getProtocols()
Description copied from interface: ProtocolHandler
Return an array of protocols supported by this ProtocolHandler.

Specified by:
getProtocols in interface ProtocolHandler

handle

public boolean handle(Context context,
                      PUProtocolRequest protocolRequest)
               throws IOException
Description copied from interface: ProtocolHandler
Handle the current request by either redirecting the request to a new port or by delivering the request to the proper endpoint.

Specified by:
handle in interface ProtocolHandler
Returns:
true, if connection should be kept alive, false - otherwise
Throws:
IOException

expireKey

public boolean expireKey(SelectionKey key)
Description copied from interface: ProtocolHandler
Invoked when the SelectorThread is about to expire a SelectionKey.

Specified by:
expireKey in interface ProtocolHandler
Returns:
true if the SelectorThread should expire the SelectionKey, false if not.

getByteBuffer

public ByteBuffer getByteBuffer()
Description copied from interface: ProtocolHandler
Returns ByteBuffer, where PUReadFilter will read data

Specified by:
getByteBuffer in interface ProtocolHandler
Returns:
ByteBuffer


Copyright © 2009 SUN Microsystems. All Rights Reserved.