org.omegahat.Environment.TaskManagement
Class DistributedTaskEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--org.omegahat.Environment.TaskManagement.DistributedTaskEvent
All Implemented Interfaces:
DistributedTaskConstants, java.io.Serializable

public class DistributedTaskEvent
extends java.awt.AWTEvent
implements DistributedTaskConstants

This class is used to represent an event in the distributed task management setup. The types of events are

  • task dispatch,
  • server discard from the pool,
  • server pool clear,
  • task completion,
  • task exception
  • See Also:
    Serialized Form

    Field Summary
    protected  java.lang.Object server
               
    protected  Task task
               
     
    Fields inherited from class java.awt.AWTEvent
    ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK
     
    Fields inherited from class java.util.EventObject
    source
     
    Fields inherited from interface org.omegahat.Environment.TaskManagement.DistributedTaskConstants
    SERVER_DISCARD, SERVER_POOL_CLEAR, SERVER_REJECT, TASK_COMPLETED, TASK_DISPATCH, TASK_ERROR
     
    Constructor Summary
    DistributedTaskEvent(TaskManager src, int type)
              Constructor typically used for the clearing of the server pool, and also as an intermediate method by the other constructors.
    DistributedTaskEvent(TaskManager src, int type, java.lang.Object server)
              Used to announce an event associated specifically with a server including the fact that the server is dead or that it has been discarded from the server pool because none of the remaining tasks can avail of it.
    DistributedTaskEvent(TaskManager src, int type, Task task)
              This is a simple constructor that just takes a task along with the source and event type.
    DistributedTaskEvent(TaskManager src, int type, Task task, java.lang.Object server)
              The converter specifying both the server and the task associated with the event, e.g.
     
    Method Summary
     java.lang.Object server()
               
     java.lang.Object server(java.lang.Object s)
               
     Task task()
               
     Task task(Task t)
               
     
    Methods inherited from class java.awt.AWTEvent
    consume, finalize, getID, isConsumed, paramString, toString
     
    Methods inherited from class java.util.EventObject
    getSource
     
    Methods inherited from class java.lang.Object
    clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    server

    protected java.lang.Object server

    task

    protected Task task
    Constructor Detail

    DistributedTaskEvent

    public DistributedTaskEvent(TaskManager src,
                                int type)
    Constructor typically used for the clearing of the server pool, and also as an intermediate method by the other constructors.

    DistributedTaskEvent

    public DistributedTaskEvent(TaskManager src,
                                int type,
                                java.lang.Object server)
    Used to announce an event associated specifically with a server including the fact that the server is dead or that it has been discarded from the server pool because none of the remaining tasks can avail of it.

    DistributedTaskEvent

    public DistributedTaskEvent(TaskManager src,
                                int type,
                                Task task)
    This is a simple constructor that just takes a task along with the source and event type. This is used when the event does not involve a server. e.g. incomplete task specification. This is primarily used by other constructors as an intermediate method.

    DistributedTaskEvent

    public DistributedTaskEvent(TaskManager src,
                                int type,
                                Task task,
                                java.lang.Object server)
    The converter specifying both the server and the task associated with the event, e.g. task completed, task error, task dispatch.
    Method Detail

    server

    public java.lang.Object server()

    server

    public java.lang.Object server(java.lang.Object s)

    task

    public Task task()

    task

    public Task task(Task t)