BEA Systems, Inc.

BEA WebLogic Server 9.0 API Reference


commonj.work
Interface WorkEvent


public interface WorkEvent

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

Since:
1.0
Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

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

public static final int WORK_ACCEPTED
Work has been accepted

Since:
1.0
See Also:
Constant Field Values

WORK_COMPLETED

public static final int WORK_COMPLETED
Work has completed.

Since:
1.0
See Also:
Constant Field Values

WORK_REJECTED

public static final int WORK_REJECTED
Work has been rejected.

Since:
1.0
See Also:
Constant Field Values

WORK_STARTED

public static final int WORK_STARTED
Work is currently running.

Since:
1.0
See Also:
Constant Field Values
Method Detail

getException

public 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

getType

public 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

public 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

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs90
Copyright 2005 BEA Systems Inc.