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

## javax.resource.spi.work
Class WorkEvent

    java.lang.Object
      java.util.EventObject
          javax.resource.spi.work.WorkEvent

All Implemented Interfaces:
  Serializable

public class WorkEvent
extends EventObject

Events that occur on work

Version:
  $Revision: 1.4 $
See Also:
  Serialized Form

Field Summary
`static int` | `WORK_ACCEPTED` The WORK_ACCEPTED value
`static int` | `WORK_COMPLETED` The WORK_COMPLETED value
`static int` | `WORK_REJECTED` The WORK_REJECTED value
`static int` | `WORK_STARTED` The WORK_STARTED value

Fields inherited from class java.util.EventObject
`source`

Constructor Summary
`WorkEvent(Object source, int type, Work work, WorkException e)` Create a new WorkEvent
`WorkEvent(Object source, int type, Work work, WorkException e, long startDuration)` Create a new WorkEvent

Method Summary
`WorkException` | `getException()` Get the exception
`long` | `getStartDuration()` Get the start duration
`int` | `getType()` Get the type
`Work` | `getWork()` Get the work

Methods inherited from class java.util.EventObject
`getSource, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### WORK_ACCEPTED

    public static final int WORK_ACCEPTED

  The WORK_ACCEPTED value

  See Also:
    Constant Field Values

### WORK_REJECTED

    public static final int WORK_REJECTED

  The WORK_REJECTED value

  See Also:
    Constant Field Values

### WORK_STARTED

    public static final int WORK_STARTED

  The WORK_STARTED value

  See Also:
    Constant Field Values

### WORK_COMPLETED

    public static final int WORK_COMPLETED

  The WORK_COMPLETED value

  See Also:
    Constant Field Values

Constructor Detail

### WorkEvent

    public WorkEvent(Object source,
                     int type,
                     Work work,
                     WorkException e)

  Create a new WorkEvent

Parameters:
  `source` - the source of the event
  `type` - the type
  `work` - the work
  `e` - the exception

### WorkEvent

    public WorkEvent(Object source,
                     int type,
                     Work work,
                     WorkException e,
                     long startDuration)

  Create a new WorkEvent

Parameters:
  `source` - the source of the event
  `type` - the type
  `work` - the work
  `e` - the exception
  `startDuration` - the delay in the start in milliseconds

Method Detail

### getType

    public int getType()

  Get the type

  Returns:
    the type

### getWork

    public Work getWork()

  Get the work

  Returns:
    the work

### getException

    public WorkException getException()

  Get the exception

  Returns:
    the work exception

### getStartDuration

    public long getStartDuration()

  Get the start duration

  Returns:
    the start duration

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

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.