Top Description Methods
org.glassfish.grizzly

public Interface Processor<E extends Context>

Known Direct Subinterfaces
org.glassfish.grizzly.filterchain.FilterChain
Known Direct Implementers
org.glassfish.grizzly.StandaloneProcessor, org.glassfish.grizzly.Context.NullProcessor
Annotations
@SuppressWarnings:deprecation
Imports
org.glassfish.grizzly.asyncqueue.MessageCloner

Processor implementations are responsible for processing I/O events, which occur on connection.
Author
Alexey Stashok

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true, if this Processor is interested and execution process will start, false otherwise.
isInterested
(IOEvent
the event to check if the Processor is interested in
ioEvent
)

Is this Processor interested in processing the i/o event

public E

Returns:

Context, or null, if default Context could be used.
obtainContext
(Connection<L>
Connection to obtain processor for.
connection
)

Creates Context

public ProcessorResult

Returns:

the result of I/O event processing
process
(E
processing context
context
)

Method will be called by framework to process some event, which occurred on a connection

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

public void
setInterested(IOEvent ioEvent, boolean
true, if Processor is interested in processing of the I/O event, or false otherwise.
isInterested
)

Set the the i/o event, this Processor is interested in

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

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

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

Method Detail

isInterestedback to summary
public boolean isInterested(IOEvent ioEvent)

Is this Processor interested in processing the i/o event

Parameters
ioEvent:IOEvent

the event to check if the Processor is interested in

Returns:boolean

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

obtainContextback to summary
public E obtainContext(Connection<L> connection)

Creates Context

Parameters
connection:Connection<L>

Connection to obtain processor for.

Returns:E

Context, or null, if default Context could be used.

processback to summary
public ProcessorResult process(E context)

Method will be called by framework to process some event, which occurred on a connection

Parameters
context:E

processing context

Returns:ProcessorResult

the result of I/O event processing

readback to summary
public void read(Connection<L> connection, CompletionHandler<ReadResult<K, L>> completionHandler)
setInterestedback to summary
public void setInterested(IOEvent ioEvent, boolean isInterested)

Set the the i/o event, this Processor is interested in

Parameters
ioEvent:IOEvent

IOEvent

isInterested:boolean

true, if Processor is interested in processing of the I/O event, or false otherwise.

writeback to summary
public void write(Connection<L> connection, Object dstAddress, Object message, CompletionHandler<WriteResult<K, L>> completionHandler)
writeback to summary
public void write(Connection<L> connection, Object dstAddress, Object message, CompletionHandler<WriteResult<K, L>> completionHandler, MessageCloner<E> messageCloner)
writeback to summary
public void write(Connection<L> connection, Object dstAddress, Object message, CompletionHandler<WriteResult<K, L>> completionHandler, PushBackHandler pushBackHandler)

Deprecated

Annotations
@Deprecated