Verastream Transaction Integrator 4.0

com.attachmate.tasks
Class TaskStatusChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.attachmate.tasks.TaskStatusChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class TaskStatusChangeEvent
extends java.util.EventObject

This class represents an event fired by a task bean when the status of the task bean status changes.

This same object can also be retrieved via ITask.getStatus. The TaskStatusChangeEvent's state consists of

See Also:
ITask, ITaskListener, Serialized Form

Field Summary
static int TASK_CANCELED
          Task status constant indicating client operation execution was canceled by the user.
static int TASK_CREATED
          Task status constant indicating client operation is created but executeSync or executeAsync has not been called yet.
static int TASK_FAILED
          Task status constant indicating unsuccessful completion of the client operation execution.
static int TASK_STARTED
          Task status constant indicating client operation started.
static int TASK_SUCCESSFUL
          Task status constant indicating successful completion of the client operation execution.
static int TASK_TIMEOUT
          Task status constant indicating client operation execution could not complete within the specified timeout.
 
Constructor Summary
TaskStatusChangeEvent(java.lang.Object source)
          Constructs a new TaskStatusChangeEvent using default status information and no exception.
TaskStatusChangeEvent(java.lang.Object source, int status)
          Constructs a new TaskStatusChangeEvent with status information.
TaskStatusChangeEvent(java.lang.Object source, int status, java.lang.Exception exception)
          Constructs a new TaskStatusChangeEvent with status and exception information.
 
Method Summary
 java.lang.Exception getException()
          Optional event information.
 int getStatus()
          Task completion status
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TASK_CREATED

public static final int TASK_CREATED
Task status constant indicating client operation is created but executeSync or executeAsync has not been called yet. A task listener event is not fired with this status. However, this status may be received if a client calls getStatus on the task bean before executing it.

See Also:
Constant Field Values

TASK_STARTED

public static final int TASK_STARTED
Task status constant indicating client operation started. This happens when executeSync or executeAsync is called on the task bean.

See Also:
Constant Field Values

TASK_SUCCESSFUL

public static final int TASK_SUCCESSFUL
Task status constant indicating successful completion of the client operation execution.

See Also:
Constant Field Values

TASK_FAILED

public static final int TASK_FAILED
Task status constant indicating unsuccessful completion of the client operation execution.

See Also:
Constant Field Values

TASK_CANCELED

public static final int TASK_CANCELED
Task status constant indicating client operation execution was canceled by the user.

See Also:
Constant Field Values

TASK_TIMEOUT

public static final int TASK_TIMEOUT
Task status constant indicating client operation execution could not complete within the specified timeout.

See Also:
Constant Field Values
Constructor Detail

TaskStatusChangeEvent

public TaskStatusChangeEvent(java.lang.Object source)
Constructs a new TaskStatusChangeEvent using default status information and no exception. This has the effect of creating an event object that reports successful completion status.

Parameters:
source - reference to the object that fired this event

TaskStatusChangeEvent

public TaskStatusChangeEvent(java.lang.Object source,
                             int status)
Constructs a new TaskStatusChangeEvent with status information.

Parameters:
source - reference to the object that fired this event
status - event status information (one of the task status constants)

TaskStatusChangeEvent

public TaskStatusChangeEvent(java.lang.Object source,
                             int status,
                             java.lang.Exception exception)
Constructs a new TaskStatusChangeEvent with status and exception information.

Parameters:
source - reference to the object that fired this event
status - event status information (one of the task status constants)
exception - optional exception describing a client operation failure in more detail
Method Detail

getStatus

public int getStatus()
Task completion status

Returns:
one of the task status constants

getException

public java.lang.Exception getException()
Optional event information. The event dispatcher may wish to forward an exception that was thrown during client operation execution containing more information about a client operation failure.

Returns:
exception object or null if the client operation completed successfully or exception was not set by dispatcher

Verastream Transaction Integrator 4.0