Top Description Inners Fields Methods
org.glassfish.grizzly.asyncqueue

public Interface AsyncQueue

Known Direct Subinterfaces
org.glassfish.grizzly.asyncqueue.AsyncQueueReader, org.glassfish.grizzly.asyncqueue.AsyncQueueWriter
Imports
org.glassfish.grizzly.Connection, .Context, .ProcessorResult

Common interface for AsyncQueue processors.
Author
Alexey Stashok

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
public static final String

Method Summary

Modifier and TypeMethod and Description
public void
close()

Close AsyncQueueProcessor and release associated resources

public boolean

Returns:

true, if there is ready data, or false otherwise.
isReady
(Connection<L> connection)

Checks whether there is ready data in AsyncQueue, associated with the Connection.

public void
onClose(Connection<L> connection)

Callback method, which is called, when Connection has been closed, to let processor release a connection associated resources.

public AsyncQueue.AsyncResult

Returns:

AsyncResult, depending on async queue status.
processAsync
(Context context)

Callback method, which is called async.

Field Detail

EXPECTING_MORE_OPTIONback to summary
public static final String EXPECTING_MORE_OPTION

Method Detail

closeback to summary
public void close()

Close AsyncQueueProcessor and release associated resources

isReadyback to summary
public boolean isReady(Connection<L> connection)

Checks whether there is ready data in AsyncQueue, associated with the Connection.

Parameters
connection:Connection<L>

Connection

Returns:boolean

true, if there is ready data, or false otherwise.

onCloseback to summary
public void onClose(Connection<L> connection)

Callback method, which is called, when Connection has been closed, to let processor release a connection associated resources.

Parameters
connection:Connection<L>

Connection

processAsyncback to summary
public AsyncQueue.AsyncResult processAsync(Context context)

Callback method, which is called async. to process ready AsyncQueue, which are associated with the given Connection

Parameters
context:Context

Context

Returns:AsyncQueue.AsyncResult

AsyncResult, depending on async queue status.

org.glassfish.grizzly.asyncqueue back to summary

public final Enum AsyncQueue.AsyncResult

extends Enum<AsyncQueue.AsyncResult>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final AsyncQueue.AsyncResult
public static final AsyncQueue.AsyncResult
public static final AsyncQueue.AsyncResult
private final ProcessorResult
public static final AsyncQueue.AsyncResult

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public ProcessorResult
public static AsyncQueue.AsyncResult
public static AsyncQueue.AsyncResult[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

COMPLETEback to summary
public static final AsyncQueue.AsyncResult COMPLETE
EXPECTING_MOREback to summary
public static final AsyncQueue.AsyncResult EXPECTING_MORE
INCOMPLETEback to summary
public static final AsyncQueue.AsyncResult INCOMPLETE
resultback to summary
private final ProcessorResult result
TERMINATEback to summary
public static final AsyncQueue.AsyncResult TERMINATE

Constructor Detail

AsyncResultback to summary
private AsyncResult(final ProcessorResult result)

Method Detail

toProcessorResultback to summary
public ProcessorResult toProcessorResult()
valueOfback to summary
public static AsyncQueue.AsyncResult valueOf(String name)
valuesback to summary
public static AsyncQueue.AsyncResult[] values()