com.sun.grizzly
Class StandaloneProcessor

java.lang.Object
  extended by com.sun.grizzly.AbstractProcessor
      extended by com.sun.grizzly.StandaloneProcessor
All Implemented Interfaces:
Processor

public class StandaloneProcessor
extends AbstractProcessor

Processor, which is not interested in processing I/O events. Connection lifecycle should be managed explicitly, using read/write/accept/connect methods. This Processor could be set on Connection to avoid it from being processed by FilterChain or other Processor. In this case Connection could be used like regular Java Socket.

Author:
Alexey Stashok

Constructor Summary
StandaloneProcessor()
           
 
Method Summary
 boolean isInterested(IOEvent ioEvent)
          StandaloneProcessor is not interested in any IOEvent.
 ProcessorResult process(Context context)
          This method should never be called, because isInterested(IOEvent) returns false for any IOEvent.
 void setInterested(IOEvent ioEvent, boolean isInterested)
          Method does nothing.
 
Methods inherited from class com.sun.grizzly.AbstractProcessor
afterProcess, beforeProcess, context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandaloneProcessor

public StandaloneProcessor()
Method Detail

process

public ProcessorResult process(Context context)
                        throws IOException
This method should never be called, because isInterested(IOEvent) returns false for any IOEvent.

Parameters:
context - processing context
Returns:
the result of I/O event processing
Throws:
IOException

isInterested

public boolean isInterested(IOEvent ioEvent)
StandaloneProcessor is not interested in any IOEvent.

Returns:
true, if this Processor is interested and execution process will start, false otherwise.

setInterested

public void setInterested(IOEvent ioEvent,
                          boolean isInterested)
Method does nothing.

Parameters:
ioEvent - IOEvent
isInterested - true, if Processor is interested in processing of the I/O event, or false otherwise.


Copyright © 2009 SUN Microsystems. All Rights Reserved.