javax.resource.spi.work
Class WorkEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.resource.spi.work.WorkEvent
All Implemented Interfaces:
java.io.Serializable

public class WorkEvent
extends java.util.EventObject

A work event.

See Also:
Serialized Form

Field Summary
static int WORK_ACCEPTED
           
static int WORK_COMPLETED
           
static int WORK_REJECTED
           
static int WORK_STARTED
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
WorkEvent(java.lang.Object source, int type, Work work, WorkException exn)
          Called with a Work instance has been accepted.
WorkEvent(java.lang.Object source, int type, Work work, WorkException exn, long startDuration)
          Called with a Work instance has been accepted.
 
Method Summary
 WorkException getException()
          Returns the work exception
 long getStartDuration()
          Returns the start duration.
 int getType()
          Returns the type of the event.
 Work getWork()
          Returns the work instance.
 
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

WORK_ACCEPTED

public static final int WORK_ACCEPTED
See Also:
Constant Field Values

WORK_COMPLETED

public static final int WORK_COMPLETED
See Also:
Constant Field Values

WORK_REJECTED

public static final int WORK_REJECTED
See Also:
Constant Field Values

WORK_STARTED

public static final int WORK_STARTED
See Also:
Constant Field Values
Constructor Detail

WorkEvent

public WorkEvent(java.lang.Object source,
                 int type,
                 Work work,
                 WorkException exn)
Called with a Work instance has been accepted.


WorkEvent

public WorkEvent(java.lang.Object source,
                 int type,
                 Work work,
                 WorkException exn,
                 long startDuration)
Called with a Work instance has been accepted.

Method Detail

getType

public int getType()
Returns the type of the event.


getWork

public Work getWork()
Returns the work instance.


getStartDuration

public long getStartDuration()
Returns the start duration.


getException

public WorkException getException()
Returns the work exception