WorkEventpublic class WorkEvent extends EventObject This class models the various events that occur during the processing of
a Work instance. |
Fields Summary |
---|
public static final int | WORK_ACCEPTEDIndicates Work instance has been accepted. | public static final int | WORK_REJECTEDIndicates Work instance has been rejected. | public static final int | WORK_STARTEDIndicates Work instance has started execution. | public static final int | WORK_COMPLETEDIndicates Work instance has completed execution. | private int | typeThe event type. | private Work | workThe Work object on which the event occured. | private WorkException | excThe exception that occured during Work processing. | private long | startDurationThe start delay duration (in milliseconds). |
Constructors Summary |
---|
public WorkEvent(Object source, int type, Work work, WorkException exc)Constructor.
super(source);
this.type = type;
this.work = work;
this.exc = exc;
| public WorkEvent(Object source, int type, Work work, WorkException exc, long startDuration)Constructor.
this(source, type, work, exc);
this.startDuration = startDuration;
|
Methods Summary |
---|
public WorkException | getException()Return the WorkException . The actual
WorkException subtype returned depends on the type of the
event. return this.exc;
| public long | getStartDuration()Return the start interval duration. return this.startDuration;
| public int | getType()Return the type of this event. return this.type;
| public Work | getWork()Return the Work instance which is the cause of the event. return this.work;
|
|