com.ibm.websphere.grid.spi

Class SPI

  1. java.lang.Object
  2. extended bycom.ibm.websphere.grid.spi.SPI
All implemented interfaces:
java.lang.Comparable
Direct known subclasses:
LifeCycle, SubJobCollector, WSGridNotificationSPI

  1. public abstract class SPI
  2. extends java.lang.Object
  3. implements java.lang.Comparable

Constructor Summary

Constructor and Description
SPI()

Method Summary

Modifier and Type Method and Description
  1. int
compareTo(java.lang.Object o)
Compares this SPI instance to another.
  1. int
getInvocationOrder()
Returns invocation order of this SPI instance.
  1. abstract
  2. java.lang.String
getName()
Returns the name of this SPI instance.
  1. void
setInvocationOrder(int n)
Called by job scheduler SPI initialization to set invocation order for this SPI instance.
  1. java.lang.String
toString()
Returns string form of this SPI instance.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SPI

  1. public SPI()

Method Detail

getName

  1. public abstract java.lang.String getName( )
Returns the name of this SPI instance. Should return a unique identifier.

setInvocationOrder

  1. public void setInvocationOrder( int n)

Called by job scheduler SPI initialization to set invocation order for this SPI instance. The order is given by the numeric qualifier from the xd.spi.properties file for the given SPI type - e.g.

    # spi.WSGridNotificationSPI.1=com.abc.NotifySPI_A
    # spi.WSGridNotificationSPI.2=com.abc.NotifySPI_B 
 
Which results in the invocation order being NotifySPI_A, then NotifySPI_B. Note that each SPI instance of the same logical type should have a unique invocation ordinal value. This is not enforced. SPIs of the same type with the same invocation order will be invoked in an unpredictable order.


getInvocationOrder

  1. public int getInvocationOrder()
Returns invocation order of this SPI instance.
Returns:
ordinal integer value of invocation order of this SPI instance.

toString

  1. public java.lang.String toString( )
Returns string form of this SPI instance.
Overrides:
toString in class java.lang.Object
Returns:
string form of this SPI instance, in the form:
 {logical-name}:{invocation-order}
 

compareTo

  1. public int compareTo(java.lang.Object o)

Compares this SPI instance to another. Comparisons are numeric, based on invocation order.

Specified by:
compareTo in interface java.lang.Comparable
Returns:
comparison result as follows:
  • -1 - indicates this SPI invocation order is less than specified SPI invocation order.
  • 0 - indicates this SPI invocation order is equal to the specified SPI invocation order.
  • 1 - indicates this SPI invocation order is greater than specified SPI invocation order.