com.sun.grizzly.portunif
Class CustomFilterChainProtocolHandler

java.lang.Object
  extended by com.sun.grizzly.portunif.CustomFilterChainProtocolHandler
All Implemented Interfaces:
ProtocolHandler

public abstract class CustomFilterChainProtocolHandler
extends Object
implements ProtocolHandler

ProtocolHandler, which passes PU request processing to a custom FilterChain.

Author:
Alexey Stashok

Constructor Summary
CustomFilterChainProtocolHandler(ProtocolChainInstanceHandler pcih)
           
 
Method Summary
 boolean expireKey(SelectionKey key)
          Invoked when the SelectorThread is about to expire a SelectionKey.
 ProtocolChainInstanceHandler getProtocolChainInstanceHandler()
           
 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
 
Methods inherited from interface com.sun.grizzly.portunif.ProtocolHandler
getByteBuffer, getProtocols
 

Constructor Detail

CustomFilterChainProtocolHandler

public CustomFilterChainProtocolHandler(ProtocolChainInstanceHandler pcih)
Method Detail

getProtocolChainInstanceHandler

public ProtocolChainInstanceHandler getProtocolChainInstanceHandler()

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.


Copyright © 2012 Oracle Corporation. All Rights Reserved.