org.opensync.engine.server
Class TaskEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byorg.opensync.engine.server.TaskEvent
All Implemented Interfaces:
java.io.Serializable

public class TaskEvent
extends java.util.EventObject

An event which indicates that a task event occurred. A TaskEvent object is passed to every TaskListener object which registered to receive the "interesting" task events using the component's addTaskListener method.

See Also:
Serialized Form

Field Summary
protected  long delay
          The delay given by the task
protected  java.lang.Exception exception
          The exception which cause failure
protected  java.util.Date start
          The date when the task start
protected  java.util.Date stop
          The date when the task stop
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TaskEvent(Task task, java.util.Date start)
          Construct a TaskEvent when the task start
TaskEvent(Task task, java.util.Date stop, java.lang.Exception exception)
          Construct a TaskEvent when the task fail
TaskEvent(Task task, java.util.Date stop, long delay)
          Construct a TaskEvent when the task stop
 
Method Summary
 long getDelay()
          Get the delay used by the task
 java.lang.Exception getException()
          Get the exception which cause failure
 java.util.Date getStart()
          Get the time when the start start
 java.util.Date getStop()
          Get the time when the start stop
 Task getTask()
          Get the task who send this event
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

start

protected java.util.Date start
The date when the task start


stop

protected java.util.Date stop
The date when the task stop


exception

protected java.lang.Exception exception
The exception which cause failure


delay

protected long delay
The delay given by the task

Constructor Detail

TaskEvent

public TaskEvent(Task task,
                 java.util.Date start)
Construct a TaskEvent when the task start

Parameters:
task - the task who send this event
start - the date when the task start

TaskEvent

public TaskEvent(Task task,
                 java.util.Date stop,
                 long delay)
Construct a TaskEvent when the task stop

Parameters:
task - the task who send this event
stop - the date when the task stop
delay - the delay used by the task

TaskEvent

public TaskEvent(Task task,
                 java.util.Date stop,
                 java.lang.Exception exception)
Construct a TaskEvent when the task fail

Parameters:
task - the task who send this event
stop - stop the date when the task stop
exception - the exception which cause failure
Method Detail

getDelay

public long getDelay()
Get the delay used by the task


getStart

public java.util.Date getStart()
Get the time when the start start


getStop

public java.util.Date getStop()
Get the time when the start stop


getException

public java.lang.Exception getException()
Get the exception which cause failure


getTask

public Task getTask()
Get the task who send this event



Copyright © 2004 sourceforge. All Rights Reserved.