Top Description Fields Constructors Methods
org.glassfish.grizzly

public Class StandaloneProcessor

extends Object
implements Processor
Class Inheritance
All Implemented Interfaces
org.glassfish.grizzly.Processor
Annotations
@SuppressWarnings:unchecked, deprecation
Imports
java.net.Socket, org.glassfish.grizzly.asyncqueue.AsyncQueueEnabledTransport, .AsyncQueueReader, .AsyncQueueWriter, .MessageCloner, org.glassfish.grizzly.filterchain.FilterChain, org.glassfish.grizzly.nio.transport.DefaultStreamReader, .DefaultStreamWriter, org.glassfish.grizzly.streams.StreamReader, .StreamWriter

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

Field Summary

Modifier and TypeField and Description
public static final StandaloneProcessor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public StreamReader

Returns:

the Connection StreamReader, to read data from the Connection.
getStreamReader
(Connection<L>
Connection to get the StreamReader for
connection
)

Get the Connection StreamReader, to read data from the Connection.

public StreamWriter

Returns:

the Connection StreamWriter, to write data to the Connection.
getStreamWriter
(Connection<L>
connection to get the StreamWriter for
connection
)

Get the Connection StreamWriter, to write data to the Connection.

public boolean
public Context
public ProcessorResult
process(final Context context)

Implements org.glassfish.grizzly.Processor.process.

This method should never be called, because StandaloneProcessor#isInterested(IOEvent) returns false for any IOEvent.

public void
read(Connection<L> connection, CompletionHandler<E> completionHandler)

Implements org.glassfish.grizzly.Processor.read.

public void
setInterested(IOEvent ioEvent, boolean isInterested)

Implements org.glassfish.grizzly.Processor.setInterested.

Method does nothing.

public void
write(final Connection<L> connection, final Object dstAddress, final Object message, final CompletionHandler<E> completionHandler)

Implements org.glassfish.grizzly.Processor.write.

public void
write(Connection<L> connection, Object dstAddress, Object message, CompletionHandler<E> completionHandler, MessageCloner<E> messageCloner)

Implements org.glassfish.grizzly.Processor.write.

public void
write(Connection<L> connection, Object dstAddress, Object message, CompletionHandler<E> completionHandler, PushBackHandler pushBackHandler)

Implements org.glassfish.grizzly.Processor.write.

Deprecated

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final StandaloneProcessor INSTANCE

Constructor Detail

StandaloneProcessorback to summary
public StandaloneProcessor()

Method Detail

getStreamReaderback to summary
public StreamReader getStreamReader(Connection<L> connection)

Get the Connection StreamReader, to read data from the Connection.

Parameters
connection:Connection<L>

Connection to get the StreamReader for

Returns:StreamReader

the Connection StreamReader, to read data from the Connection.

getStreamWriterback to summary
public StreamWriter getStreamWriter(Connection<L> connection)

Get the Connection StreamWriter, to write data to the Connection.

Parameters
connection:Connection<L>

connection to get the StreamWriter for

Returns:StreamWriter

the Connection StreamWriter, to write data to the Connection.

isInterestedback to summary
public boolean isInterested(IOEvent ioEvent)

Implements org.glassfish.grizzly.Processor.isInterested.

StandaloneProcessor is not interested in any IOEvent.

Annotations
@Override
obtainContextback to summary
public Context obtainContext(final Connection<L> connection)

Implements org.glassfish.grizzly.Processor.obtainContext.

Doc from org.glassfish.grizzly.Processor.obtainContext.

Creates Context

Annotations
@Override
processback to summary
public ProcessorResult process(final Context context)

Implements org.glassfish.grizzly.Processor.process.

This method should never be called, because StandaloneProcessor#isInterested(IOEvent) returns false for any IOEvent.

Annotations
@Override
readback to summary
public void read(Connection<L> connection, CompletionHandler<E> completionHandler)

Implements org.glassfish.grizzly.Processor.read.

Annotations
@Override
setInterestedback to summary
public void setInterested(IOEvent ioEvent, boolean isInterested)

Implements org.glassfish.grizzly.Processor.setInterested.

Method does nothing.

Annotations
@Override
writeback to summary
public void write(final Connection<L> connection, final Object dstAddress, final Object message, final CompletionHandler<E> completionHandler)

Implements org.glassfish.grizzly.Processor.write.

Annotations
@Override
writeback to summary
public void write(Connection<L> connection, Object dstAddress, Object message, CompletionHandler<E> completionHandler, MessageCloner<E> messageCloner)

Implements org.glassfish.grizzly.Processor.write.

Annotations
@Override
writeback to summary
public void write(Connection<L> connection, Object dstAddress, Object message, CompletionHandler<E> completionHandler, PushBackHandler pushBackHandler)

Implements org.glassfish.grizzly.Processor.write.

Deprecated

Annotations
@Override
@Deprecated