Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.6)

Part Number E13941-06

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

Copyright 1996, 2011, 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.

Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.6)

Part Number E13941-06