com.ibm.wsspi.batch
Class LifeCycle

java.lang.Object
  extended by com.ibm.websphere.grid.spi.SPI
      extended by com.ibm.wsspi.batch.LifeCycle
All Implemented Interfaces:
java.lang.Comparable

public abstract class LifeCycle
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
    LifeCycle()
               
     
    Method Summary
     java.lang.String getName()
              Returns the name of this SPI instance.
    abstract  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

    public LifeCycle()
    Method Detail

    stateChanged

    public abstract void stateChanged(java.lang.String jobID,
                                      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

    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