public class StandaloneProcessor extends Object implements Processor
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.| Modifier and Type | Field and Description |
|---|---|
static StandaloneProcessor |
INSTANCE |
| Constructor and Description |
|---|
StandaloneProcessor() |
| Modifier and Type | Method and Description |
|---|---|
StreamReader |
getStreamReader(Connection connection)
|
StreamWriter |
getStreamWriter(Connection 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. |
void |
read(Connection connection,
CompletionHandler completionHandler) |
void |
setInterested(IOEvent ioEvent,
boolean isInterested)
Method does nothing.
|
void |
write(Connection connection,
Object dstAddress,
Object message,
CompletionHandler completionHandler) |
void |
write(Connection connection,
Object dstAddress,
Object message,
CompletionHandler completionHandler,
MessageCloner messageCloner) |
void |
write(Connection connection,
Object dstAddress,
Object message,
CompletionHandler completionHandler,
PushBackHandler pushBackHandler)
Deprecated.
|
public static final StandaloneProcessor INSTANCE
public ProcessorResult process(Context context)
isInterested(IOEvent) returns false for any
IOEvent.public 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)
ProcessorContextobtainContext 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.public StreamWriter getStreamWriter(Connection connection)
Connection StreamWriter, to write data to the
Connection.public void read(Connection connection, CompletionHandler completionHandler)
public void write(Connection connection, Object dstAddress, Object message, CompletionHandler completionHandler)
public void write(Connection connection, Object dstAddress, Object message, CompletionHandler completionHandler, MessageCloner messageCloner)
@Deprecated public void write(Connection connection, Object dstAddress, Object message, CompletionHandler completionHandler, PushBackHandler pushBackHandler)
Copyright © 2014 Oracle Corporation. All Rights Reserved.