Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | Oracle
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## commonj.work
Interface WorkEvent

    public interface WorkEvent

This is sent to a WorkListener as the Work is processed by a WorkManager.

Since:
  1.0

Field Summary
`static int` | `WORK_ACCEPTED` Work has been accepted
`static int` | `WORK_COMPLETED` Work has completed.
`static int` | `WORK_REJECTED` Work has been rejected.
`static int` | `WORK_STARTED` Work is currently running.

Method Summary
`WorkException` | `getException()` This returns the exception if any in the case of WORK_COMPLETED.
`int` | `getType()` This returns WORK_ACCEPTED etc
`WorkItem` | `getWorkItem()` This returns a WorkItem that represents the Work submitted to a WorkManager.

Field Detail

### WORK_ACCEPTED

    static final int WORK_ACCEPTED

  Work has been accepted

  Since:
    1.0
  See Also:
    Constant Field Values

### WORK_REJECTED

    static final int WORK_REJECTED

  Work has been rejected.

  Since:
    1.0
  See Also:
    Constant Field Values

### WORK_STARTED

    static final int WORK_STARTED

  Work is currently running.

  Since:
    1.0
  See Also:
    Constant Field Values

### WORK_COMPLETED

    static final int WORK_COMPLETED

  Work has completed.

  Since:
    1.0
  See Also:
    Constant Field Values

Method Detail

### getType

    int getType()

  This returns WORK_ACCEPTED etc

  Returns:
    one of the event constants that indicate the type of event this WorkEvent represents.
  Since:
    1.0

### getWorkItem

    WorkItem getWorkItem()

  This returns a WorkItem that represents the Work submitted to a WorkManager. This WorkItem may not be the same WorkItem reference that was returned from the WorkManager.schedule() methods.

  Returns:
    the WorkItem that this WorkEvent is for.
  Since:
    1.1

### getException

    WorkException getException()

  This returns the exception if any in the case of WORK_COMPLETED.

  Returns:
    the WorkException thrown if a Work completed with exception. Null if there is no exception.
  Since:
    1.0

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://edocs.bea.com/wls/docs103 Copyright 1996,2008, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD