javax.resource.spi.work
Class WorkEvent

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

public class WorkEvent
extends java.util.EventObject

Events that occur on work

See Also:
Serialized Form

Field Summary
static int WORK_ACCEPTED
          The WORK_ACCEPTED value
static int WORK_COMPLETED
          The WORK_COMPLETED value
static int WORK_REJECTED
          The WORK_REJECTED value
static int WORK_STARTED
          The WORK_STARTED value
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
WorkEvent(java.lang.Object source, int type, Work (src)  work, WorkException (src)  e)
          Create a new WorkEvent
WorkEvent(java.lang.Object source, int type, Work (src)  work, WorkException (src)  e, long startDuration)
          Create a new WorkEvent
 
Method Summary
 WorkException (src) getException()
          Get the exception
 long getStartDuration()
          Get the start duration
 int getType()
          Get the type
 Work (src) getWork()
          Get the work
 
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
The WORK_ACCEPTED value

See Also:
Constant Field Values (src)

WORK_REJECTED

public static final int WORK_REJECTED
The WORK_REJECTED value

See Also:
Constant Field Values (src)

WORK_STARTED

public static final int WORK_STARTED
The WORK_STARTED value

See Also:
Constant Field Values (src)

WORK_COMPLETED

public static final int WORK_COMPLETED
The WORK_COMPLETED value

See Also:
Constant Field Values (src)
Constructor Detail

WorkEvent

public WorkEvent(java.lang.Object source,
                 int type,
                 Work (src)  work,
                 WorkException (src)  e)
Create a new WorkEvent

Parameters:
source - the source of the event
type - the type
work - the work
e - the exception

WorkEvent

public WorkEvent(java.lang.Object source,
                 int type,
                 Work (src)  work,
                 WorkException (src)  e,
                 long startDuration)
Create a new WorkEvent

Parameters:
source - the source of the event
type - the type
work - the work
e - the exception
startDuration - the delay in the start in milliseconds
Method Detail

getType

public int getType()
Get the type

Returns:
the type

getWork

public Work (src)  getWork()
Get the work

Returns:
the work

getException

public WorkException (src)  getException()
Get the exception

Returns:
the work exception

getStartDuration

public long getStartDuration()
Get the start duration

Returns:
the start duration