com.ibm.wsspi.batch

Class LifeCycle

  1. java.lang.Object
  2. extended bycom.ibm.websphere.grid.spi.SPI
  3. extended bycom.ibm.wsspi.batch.LifeCycle
All implemented interfaces:
java.lang.Comparable

  1. public abstract class LifeCycle
  2. extends SPI
LifeCycle is the abstract base class for the LifeCycle System Programming Interface (SPI). Use the LifeCycle SPI to receive job state change notifications. Each time a job transitions from one state to another, this SPI is invoked, indicating the new state for the affected job.

Implement the LifeCycle SPI, by extending this class and implementing the stateChanged method.

Configure this SPI with the following declaration in the xd.spi.properties file:

 spi.LifeCycle=<fully-qualified implementation class name>
 

Notes:

  1. The xd.spi.properties file is located in:
  2.  <WAS install root>/properties.  E.g.
     
           /WebSphere/AppServer/properties
     
  3. The jar file containing the implementation of this SPI should be stored in:
  4.  <WAS install root>/lib/classes.  E.g.
     
           /WebSphere/AppServer/lib/classes
     
    You are responsible for creating the classes directory if it does not already exist.

    Constructor Summary

    Constructor and Description
    LifeCycle()

    Method Summary

    Modifier and Type Method and Description
    1. java.lang.String
    getName()
    1. abstract
    2. void
    stateChanged(java.lang.String jobID,int newState)
    Callback invoked by job scheduler when a job changes state.
    Methods inherited from class com.ibm.websphere.grid.spi.SPI
    compareTo, getInvocationOrder, setInvocationOrder, toString
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Constructor Detail

    LifeCycle

    1. public LifeCycle()

    Method Detail

    stateChanged

    1. public abstract void stateChanged( java.lang.String jobID,
    2. int newState)
    Callback invoked by job scheduler when a job changes state.
    Parameters:
    jobID - specifies the job ID of the job that has changed state.
    newState - specifies the new state of the job.
    See Also:
    Job State Constants

    getName

    1. public java.lang.String getName( )
    Description copied from class: SPI
    Returns the name of this SPI instance. Should return a unique identifier.
    Specified by:
    getName in class SPI