com.ibm.websphere.asynchbeans

Interface WorkEvent


  1. public interface WorkEvent
This is sent to a WorkListener as the Work is processed by a WorkManager.

Field Summary

Modifier and Type Field and Description
  1. static
  2. int
WORK_ACCEPTED
The WORK_ACCEPTED constant indicates Work was successfully submitted to the WorkManager.
  1. static
  2. int
WORK_COMPLETED
The WORK_COMPLETED constant indicates the Work completed.
  1. static
  2. int
WORK_REJECTED
The WORK_REJECTED constant indicates Work.run failed to start.
  1. static
  2. int
WORK_STARTED
The WORK_STARTED constant indicates the Work was allocated to a thread and is about to execute.

Method Summary

Modifier and Type Method and Description
  1. WorkException
getException()
This returns the exception if any in the case of WORK_COMPLETED.
  1. long
getStartDuration()
This returns 0 in the current implementation.
  1. int
getType()
This returns WORK_ACCEPTED etc
  1. Work
getWork()
This returns a copy of the Work in progress.

Field Detail

WORK_ACCEPTED

  1. static final int WORK_ACCEPTED
The WORK_ACCEPTED constant indicates Work was successfully submitted to the WorkManager. This means the parameters and thread context are valid at this point. It does not reflect acceptance to a pool or successful thread allocation.
See Also:

WORK_REJECTED

  1. static final int WORK_REJECTED
The WORK_REJECTED constant indicates Work.run failed to start. This can happen anywhere during the start process. It happens independently of all other events. Work might be rejected due to the startTimeout expiring, context propogation failure, security failure, or other internal failures.
See Also:

WORK_STARTED

  1. static final int WORK_STARTED
The WORK_STARTED constant indicates the Work was allocated to a thread and is about to execute.
See Also:

WORK_COMPLETED

  1. static final int WORK_COMPLETED
The WORK_COMPLETED constant indicates the Work completed. The Work might have completed successfully or with error.
See Also:

Method Detail

getType

  1. int getType()
This returns WORK_ACCEPTED etc

getWork

  1. Work getWork()
This returns a copy of the Work in progress.

getStartDuration

  1. long getStartDuration()
This returns 0 in the current implementation.

getException

  1. WorkException getException()
This returns the exception if any in the case of WORK_COMPLETED.