org.jdtaus.core.monitor
Class TaskEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.jdtaus.core.monitor.TaskEvent
All Implemented Interfaces:
Serializable

public class TaskEvent
extends EventObject

Event produced by a Task.

Version:
$Id: TaskEvent.java 8044 2009-07-02 01:29:05Z schulte2005 $
Author:
Christian Schulte
See Also:
TaskEventSource, Serialized Form

Field Summary
static int CHANGED_STATE
          Event constant indicating that state of a Task changed.
static int ENDED
          Event constant indicating the end of a Task.
static int STARTED
          Event constant indicating the start of a Task.
 
Constructor Summary
TaskEvent(Task source, int type)
          Creates a new instance of TaskEvent.
 
Method Summary
 Task getTask()
          Gets the Task producing the event.
 int getType()
          Getter for property type.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CHANGED_STATE

public static final int CHANGED_STATE
Event constant indicating that state of a Task changed.

See Also:
Constant Field Values

ENDED

public static final int ENDED
Event constant indicating the end of a Task.

See Also:
Constant Field Values

STARTED

public static final int STARTED
Event constant indicating the start of a Task.

See Also:
Constant Field Values
Constructor Detail

TaskEvent

public TaskEvent(Task source,
                 int type)
Creates a new instance of TaskEvent.

Parameters:
source - the task producing the new event.
type - constant indicating the type of the event.
Throws:
IllegalArgumentException - if type is not equal to one of the constants STARTED, CHANGED_STATE or ENDED.
Method Detail

getTask

public final Task getTask()
Gets the Task producing the event.

Returns:
the source of the event.

getType

public final int getType()
Getter for property type.

Returns:
the type of the event.

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class EventObject
Returns:
a string representation of the object.


Copyright © 2005-2009 jDTAUS. All Rights Reserved.