de.myfoo.commonj.work
Class FooWorkEvent

java.lang.Object
  extended by de.myfoo.commonj.work.FooWorkEvent
All Implemented Interfaces:
commonj.work.WorkEvent

public class FooWorkEvent
extends java.lang.Object
implements commonj.work.WorkEvent

Implementation of a work event.

Version:
1.0
Author:
Andreas Keldenich

Field Summary
 
Fields inherited from interface commonj.work.WorkEvent
WORK_ACCEPTED, WORK_COMPLETED, WORK_REJECTED, WORK_STARTED
 
Constructor Summary
FooWorkEvent(commonj.work.WorkItem wi, int type)
          Creates a new instance of FooWorkEvent.
 
Method Summary
 commonj.work.WorkException getException()
          Get the Exception if one was thorwn by the work.
 int getType()
          Get the event type.
 commonj.work.WorkItem getWorkItem()
          Get the work item.
 void setException(java.lang.Throwable th)
          Set Exception
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FooWorkEvent

public FooWorkEvent(commonj.work.WorkItem wi,
                    int type)
Creates a new instance of FooWorkEvent.

Parameters:
wi - the work item
type - type of the event.
Method Detail

getType

public int getType()
Get the event type.

Specified by:
getType in interface commonj.work.WorkEvent
See Also:
WorkEvent.getType()

getWorkItem

public commonj.work.WorkItem getWorkItem()
Get the work item.

Specified by:
getWorkItem in interface commonj.work.WorkEvent
See Also:
WorkEvent.getWorkItem()

getException

public commonj.work.WorkException getException()
Get the Exception if one was thorwn by the work.

Specified by:
getException in interface commonj.work.WorkEvent
See Also:
WorkEvent.getException()

setException

public void setException(java.lang.Throwable th)
Set Exception

Parameters:
th - thorwable