com.ibm.websphere.grid.spi
Class SPI
- java.lang.Object
com.ibm.websphere.grid.spi.SPI
All implemented interfaces:
java.lang.Comparable
Direct known subclasses:
- public abstract class SPI
- extends java.lang.Object
- implements java.lang.Comparable
Constructor Summary
Constructor and Description |
---|
SPI()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
compareTo(java.lang.Object o)
Compares this SPI instance to another.
|
|
getInvocationOrder()
Returns invocation order of this SPI instance.
|
|
getName()
Returns the name of this SPI instance.
|
|
setInvocationOrder(int n)
Called by job scheduler SPI initialization to set invocation order
for this SPI instance.
|
|
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
- public SPI()
Method Detail
getName
- public abstract java.lang.String getName( )
Returns the name of this SPI instance. Should return a unique identifier.
setInvocationOrder
- 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_BWhich 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
- public int getInvocationOrder()
Returns invocation order of this SPI instance.
Returns:
ordinal integer value of invocation order of this SPI instance.
toString
- 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
- 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.