Class TaskProcessor


  • public class TaskProcessor
    extends java.lang.Object
    A class responsible for processing 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.
    Author:
    Pavel Bucek (pavel.bucek at oracle.com), Petr Janouch
    • Constructor Detail

      • TaskProcessor

        public TaskProcessor()
        Constructor.

        There is no condition that has to be checked before processing each task.

    • Method Detail

      • processTask

        public void processTask​(TaskProcessor.Task task)
        Add a task to the task queue and process as much tasks from the task queue as possible.
        Parameters:
        task - TaskProcessor.Task that should be processed.
      • processTask

        public void processTask()
        Process as much tasks from task queue as possible.