| Modifier and Type | Field and Description |
|---|---|
| private CometContext | |
| protected static final Logger | |
| protected final Queue | messageQueue
todo replace with non array copying list for non resizing add situations, using internal index to keep track of state , not a linked list, it has too much overhead and eats memory. |
| private final int | messageQueueLimit
max number of events to locally queue for this CometHandler. |
| private int | queueSize
current queue size |
| private boolean | readyForWork
true means that no thread is currently active on this comet handlers queue logic |
| private Response | |
| private boolean | shuttingDown
used for preventing the worker threads from the executor event queue from adding events to the comet handlers local queue or starting IO logic after shut down. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | enqueueEvent(CometEvent<E> event)
Queues event if another thread is currently working on this handler. |
| public CometContext | |
| public Response | |
| public void | onInterrupt(CometEvent<E> event)
Implements org. Receive |
| public void | onQueueFull(CometEvent<E> event)
Called in synchronized context when the comet handler's local event queue is full. |
| public void | onTerminate(CometEvent<E> event)
Implements org. Receive |
| public void | setCometContext(final CometContext<E> context)
Implements org.
|
| public void | setResponse(final Response response)
Implements org.
|
| protected void |
| context | back to summary |
|---|---|
| private CometContext<E> context | |
| logger | back to summary |
|---|---|
| protected static final Logger logger | |
| messageQueue | back to summary |
|---|---|
| protected final Queue<CometEvent<E>> messageQueue todo replace with non array copying list for non resizing add situations, using internal index to keep track of state , not a linked list, it has too much overhead and eats memory. | |
| messageQueueLimit | back to summary |
|---|---|
| private final int messageQueueLimit max number of events to locally queue for this CometHandler. | |
| queueSize | back to summary |
|---|---|
| private int queueSize current queue size | |
| readyForWork | back to summary |
|---|---|
| private boolean readyForWork true means that no thread is currently active on this comet handlers queue logic | |
| response | back to summary |
|---|---|
| private Response response | |
| shuttingDown | back to summary |
|---|---|
| private boolean shuttingDown used for preventing the worker threads from the executor event queue from adding events to the comet handlers local
queue or starting IO logic after shut down. | |
| DefaultConcurrentCometHandler | back to summary |
|---|---|
| public DefaultConcurrentCometHandler(final CometContext<E> context, final Response response) | |
| DefaultConcurrentCometHandler | back to summary |
|---|---|
| public DefaultConcurrentCometHandler(int messageQueueLimit) | |
| enqueueEvent | back to summary |
|---|---|
| public void enqueueEvent(CometEvent<E> event) throws IOException Queues event if another thread is currently working on this handler. The first thread to start working will keep doing so until there are no further events in the internal queue. | |
| getCometContext | back to summary |
|---|---|
| public CometContext Implements org.
| |
| getResponse | back to summary |
|---|---|
| public Response getResponse() Implements org.
| |
| onInterrupt | back to summary |
|---|---|
| public void onInterrupt(CometEvent<E> event) throws IOException Implements org. Doc from org. Receive
| |
| onQueueFull | back to summary |
|---|---|
| public void onQueueFull(CometEvent<E> event) throws IOException Called in synchronized context when the comet handler's local event queue is full.
| |
| onTerminate | back to summary |
|---|---|
| public void onTerminate(CometEvent<E> event) throws IOException Implements org. Doc from org. Receive
| |
| setCometContext | back to summary |
|---|---|
| public void setCometContext(final CometContext<E> context) Implements org.
| |
| setResponse | back to summary |
|---|---|
| public void setResponse(final Response response) Implements org.
| |
| terminate | back to summary |
|---|---|
| protected void terminate() | |