public class TaskProcessor
extends java.lang.Object
TaskProcessor.Task. It ensures that only one task will be processed at a time, because
Grizzly Worker-thread IOStrategy does not wait until one message is processed before dispatching another one.| Modifier and Type | Class and Description |
|---|---|
static interface |
TaskProcessor.Condition
Condition used in
processTask(org.glassfish.tyrus.container.grizzly.client.TaskProcessor.Task). |
static class |
TaskProcessor.Task
Generic task representation.
|
| Constructor and Description |
|---|
TaskProcessor()
Constructor.
|
TaskProcessor(TaskProcessor.Condition condition)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
processTask()
Process as much tasks from task queue as possible.
|
void |
processTask(TaskProcessor.Task task)
Add a task to the task queue and process as much tasks from the task queue as possible.
|
public TaskProcessor(TaskProcessor.Condition condition)
condition - if present, it will be called before processing each TaskProcessor.Task. When TaskProcessor.Condition.isValid()
returns false, processing will be terminated. If null,
all tasks from the queue will be processed.public TaskProcessor()
There is no condition that has to be checked before processing each task.
public void processTask(TaskProcessor.Task task)
task - TaskProcessor.Task that should be processed.public void processTask()
Copyright © 2012–2025 Oracle Corporation. All rights reserved.