- All Known Subinterfaces:
AsyncQueueReader<L>,AsyncQueueWriter<L>
- All Known Implementing Classes:
AbstractNIOAsyncQueueReader,AbstractNIOAsyncQueueWriter,TCPNIOAsyncQueueReader,TCPNIOAsyncQueueWriter,UDPNIOAsyncQueueReader,UDPNIOAsyncQueueWriter
public interface AsyncQueue
Common interface for
AsyncQueue processors.- Author:
- Alexey Stashok
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close AsyncQueueProcessor and release associated resourcesbooleanisReady(Connection connection) Checks whether there is ready data inAsyncQueue, associated with theConnection.voidonClose(Connection connection) Callback method, which is called, whenConnectionhas been closed, to let processor release a connection associated resources.processAsync(Context context) Callback method, which is called async.
-
Field Details
-
EXPECTING_MORE_OPTION
-
-
Method Details
-
isReady
Checks whether there is ready data inAsyncQueue, associated with theConnection.- Parameters:
connection-Connection- Returns:
- true, if there is ready data, or false otherwise.
-
processAsync
Callback method, which is called async. to process readyAsyncQueue, which are associated with the givenConnection- Parameters:
context-Context- Returns:
AsyncQueue.AsyncResult, depending on async queue status.
-
onClose
Callback method, which is called, whenConnectionhas been closed, to let processor release a connection associated resources.- Parameters:
connection-Connection
-
close
void close()Close AsyncQueueProcessor and release associated resources
-