|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mqe.MQe | +--com.ibm.mqe.MQeRule | +--examples.mqbridge.rules.MQeStartupRule
To be a model rules class.
This rule class is specified on an mqbridge administered object's registry entry.
When the administered object is loaded, this rule class is consulted to see whether the administered object should be started, or left in the stopped state, or whether the administered object's children should be started or not.
Field Summary | |
static int |
START_NOTHING
A possible value returned from the permit() method. |
static int |
START_PARENTS_AND_ME
A possible value returned from the permit() method. |
static int |
START_PARENTS_AND_ME_AND_CHILDREN
A possible value returned from the permit() method. |
static short[] |
version
|
Constructor Summary | |
MQeStartupRule()
|
Method Summary | |
java.lang.Object |
permit(java.lang.Object administeredObjectNameO,
java.lang.Object administeredObjectTypeO,
java.lang.Object registryO)
Query whether an administered object should be started just after it has been loaded. |
protected java.lang.Integer |
permit(java.lang.String administeredObjectName,
java.lang.String administeredObjectType,
MQeRegistry registry)
The same as the permit() method call, but the parameters are strongly typed. |
Methods inherited from class com.ibm.mqe.MQeRule |
activate, close, newRule |
Methods inherited from class com.ibm.mqe.MQe |
abbreviate, alias, asciiToByte, byteToAscii, byteToHex, byteToHex, byteToInt, byteToLong, byteToShort, byteToUnicode, fileSeparator, getEventLogHandler, hexToAscii, hexToByte, intToByte, isCLDC, loadClass, loadObject, log, setEventLogHandler, setLoader, sliceByteArray, type, unicodeToByte, uniqueValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static short[] version
public static final int START_NOTHING
public static final int START_PARENTS_AND_ME
public static final int START_PARENTS_AND_ME_AND_CHILDREN
Constructor Detail |
public MQeStartupRule()
Method Detail |
public java.lang.Object permit(java.lang.Object administeredObjectNameO, java.lang.Object administeredObjectTypeO, java.lang.Object registryO) throws java.lang.Exception
The specified administered object has just been loaded into the mqbridge system. The bridge wants to find out whether this administered object needs to be moved into the "running" state, or left in the "stopped" state.
If this rule decides that this administered object should be started, then the mqbridge will make sure that all the parents of this administered object are also started.
If this rule decides that this administered object should be started, then it must also decide whether the children of this administered object should also be started.
administeredObjectNameO
- A String which has been cast
to an Object type. It holds the fully-qualified name of the
entry in the registry which identifies the administered object
to be started up. You can use it to look up values for
this administered object in the registry, to decide whether
this administered object should be started or otherwise.administeredObjectTypeO
- A String which has been cast
to an Object type. It holds the "sort" of administered object
which has just been loaded. This can also be used to uniquely
identify an entry in the registry, whose values can be
queried to decide whether this object should be started or not.registryO
- An MQeRegistry which has been cast to an
Object type. It refers to an open, ready-to-use MQeRegistry
type which can be used to look-up the passed administered
object, so it's registry values can be queried. This can
be used to help decide whether this administered object
should be started or not.
Valid return values are:
Says "leave this administered object in it's current state"
Says "start all my parents, and my parents' parents, then start me.
Says "start all my parents, and my parents' parents, then start me, then start each of my children in turn.
If any other value is returned, or a non-Integer is returned or the class cannot be loaded for some reason, or it throws an exception, then this has the same effect as returning the START_NOTHING constant value.
java.lang.Exception
- Fails with an exception if something goes wrong
when deciding on the return value, or if the parameters are the
wrong type. An exception will have the same effect as returning
the START_NOTHING value.protected java.lang.Integer permit(java.lang.String administeredObjectName, java.lang.String administeredObjectType, MQeRegistry registry)
Although this rule class could use information contained in the registry to decide whether to start or otherwise the named administered object, this model class just returns the START_PARENTS_AND_ME value. This is a sensible default.
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |