| 
 | J2EE1.4 SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
javax.resource.spi.work.WorkEvent
This class models the various events that occur during the processing of
 a Work instance.
| Field Summary | |
| static int | WORK_ACCEPTEDIndicates Workinstance has been accepted. | 
| static int | WORK_COMPLETEDIndicates Workinstance has completed execution. | 
| static int | WORK_REJECTEDIndicates Workinstance has been rejected. | 
| static int | WORK_STARTEDIndicates Workinstance has started execution. | 
| Fields inherited from class java.util.EventObject | 
| source | 
| Constructor Summary | |
| WorkEvent(java.lang.Object source,
          int type,
          Work work,
          WorkException exc)Constructor. | |
| WorkEvent(java.lang.Object source,
          int type,
          Work work,
          WorkException exc,
          long startDuration)Constructor. | |
| Method Summary | |
|  WorkException | getException()Return the WorkException. | 
|  long | getStartDuration()Return the start interval duration. | 
|  int | getType()Return the type of this event. | 
|  Work | getWork()Return the Workinstance which is the cause of the 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 | 
public static final int WORK_ACCEPTED
Work instance has been accepted.
public static final int WORK_REJECTED
Work instance has been rejected.
public static final int WORK_STARTED
Work instance has started execution.
public static final int WORK_COMPLETED
Work instance has completed execution.
| Constructor Detail | 
public WorkEvent(java.lang.Object source,
                 int type,
                 Work work,
                 WorkException exc)
source - The object on which the event initially 
 occurred.type - The event type.work - The Work object on which 
 the event occured.exc - The exception that occured during 
 Work processing.
public WorkEvent(java.lang.Object source,
                 int type,
                 Work work,
                 WorkException exc,
                 long startDuration)
source - The object on which the event initially 
 occurred.type - The event type.work - The Work object on which 
 the event occured.exc - The exception that occured during 
 Work processing.startDuration - The start delay duration 
 (in milliseconds).| Method Detail | 
public int getType()
public Work getWork()
Work instance which is the cause of the event.
Work instance.public long getStartDuration()
Work
 was accepted, until the Work execution started. Note, 
 this does not offer real-time guarantees. It is valid to return -1, if
 the actual start interval duration is unknown.public WorkException getException()
WorkException. The actual 
 WorkException subtype returned depends on the type of the
 event.
WorkRejectedException or a 
 WorkCompletedException, if any.| 
 | J2EE1.4 SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2003 Sun Microsystems, Inc. All rights reserved.