com.sun.grizzly
Interface ReinvokeAware

All Known Implementing Classes:
DefaultProtocolChain, HttpProtocolChain, ParserProtocolFilter, PUReadFilter, ReadFilter, ResourceAllocationFilter, UDPReadFilter

public interface ReinvokeAware

The common interface, for objects, which could have influence on a ProtocolChain reinvokation.

Author:
Jean-Frnacois Arcand, Alexey Stashok

Method Summary
 boolean isContinuousExecution()
          Return true if the current ExecutorService can re-execute its ProtocolFilter after a successful execution.
 void setContinuousExecution(boolean continousExecution)
          Set to true if the current ExecutorService can re-execute its ProtocolFilter(s) after a successful execution.
 

Method Detail

setContinuousExecution

void setContinuousExecution(boolean continousExecution)
Set to true if the current ExecutorService can re-execute its ProtocolFilter(s) after a successful execution. Enabling this property is useful for protocol that needs to support pipelined message requests as the ProtocolFilter are automatically re-executed, avoiding the overhead of releasing the current Thread, registering back the SelectionKey to the SelectorHandler and waiting for a new NIO event. Some protocols (like http) can get the http headers in one SocketChannel.read, parse the message and then get the next http message on the second SocketChannel.read(). Not having to release the Thread and re-execute the ProtocolFilter greatly improve performance.

Parameters:
continousExecution - true to enable continuous execution. (default is false).

isContinuousExecution

boolean isContinuousExecution()
Return true if the current ExecutorService can re-execute its ProtocolFilter after a successful execution.



Copyright © 2012 Oracle Corporation. All Rights Reserved.