|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.StandaloneProcessor
public class StandaloneProcessor
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.
| Field Summary | |
|---|---|
static StandaloneProcessor |
INSTANCE
|
| Constructor Summary | |
|---|---|
StandaloneProcessor()
|
|
| Method Summary | |
|---|---|
StreamReader |
getStreamReader(Connection connection)
Get the Connection StreamReader, to read data from the
Connection. |
StreamWriter |
getStreamWriter(Connection connection)
Get the Connection StreamWriter, to write data to the
Connection. |
boolean |
isInterested(IOEvent ioEvent)
StandaloneProcessor is not interested in any IOEvent. |
Context |
obtainContext(Connection connection)
Creates Context |
ProcessorResult |
process(Context context)
This method should never be called, because isInterested(IOEvent) returns false for any
IOEvent. |
GrizzlyFuture |
read(Connection connection,
CompletionHandler completionHandler)
|
void |
setInterested(IOEvent ioEvent,
boolean isInterested)
Method does nothing. |
GrizzlyFuture |
write(Connection connection,
java.lang.Object dstAddress,
java.lang.Object message,
CompletionHandler completionHandler)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final StandaloneProcessor INSTANCE
| Constructor Detail |
|---|
public StandaloneProcessor()
| Method Detail |
|---|
public ProcessorResult process(Context context)
throws java.io.IOException
isInterested(IOEvent) returns false for any
IOEvent.
process in interface Processorcontext - processing context
java.io.IOExceptionpublic boolean isInterested(IOEvent ioEvent)
StandaloneProcessor is not interested in any IOEvent.
isInterested in interface ProcessorProcessor is interested and execution
process will start, false otherwise.
public void setInterested(IOEvent ioEvent,
boolean isInterested)
setInterested in interface ProcessorioEvent - IOEventisInterested - true, if Processor is interested in
processing of the I/O event, or false otherwise.public Context obtainContext(Connection connection)
ProcessorContext
obtainContext in interface Processorconnection - Connection to obtain processor for.
Context, or null, if default Context
could be used.public StreamReader getStreamReader(Connection connection)
Connection StreamReader, to read data from the
Connection.
Connection StreamReader, to read data from the
Connection.public StreamWriter getStreamWriter(Connection connection)
Connection StreamWriter, to write data to the
Connection.
Connection StreamWriter, to write data to the
Connection.
public GrizzlyFuture read(Connection connection,
CompletionHandler completionHandler)
throws java.io.IOException
read in interface Processorjava.io.IOException
public GrizzlyFuture write(Connection connection,
java.lang.Object dstAddress,
java.lang.Object message,
CompletionHandler completionHandler)
throws java.io.IOException
write in interface Processorjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||