|
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
This is a superclass from which all WebSphere MQ Everyplace rule classes derive their basic function.
This class is a descendant of MQe
Note:Any unexpected exception thrown from a user's rule method (for instance, a null pointer exception) will result in the default behaviour being applied as though the rule invocation had never occurred.
Field Summary |
Constructor Summary | |
MQeRule()
Constructs an MQeRule object. |
Method Summary | |
void |
activate(java.lang.Object thisOwner)
Called when the rule is activated. |
void |
close()
This method signals that the rule should be deactivated. |
MQeRule |
newRule(java.lang.Object owner,
MQeRule thisRule)
Authorise change of rule class. |
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 |
Constructor Detail |
public MQeRule()
Constructs an MQeRule object.
None
Method Detail |
public void activate(java.lang.Object thisOwner)
Called when the rule is activated.
This method is called after the constructor but before the rule is used. Subclasses may override this method.
thisOwner
- The object that owns this rule. Depending on the type of
rule, it could be a reference to a queue manager, a queue,or some other
WebSphere MQ Everyplace object.
None
public void close()
This method signals that the rule should be deactivated. Subclasses may override this method.
None
public MQeRule newRule(java.lang.Object owner, MQeRule thisRule) throws java.lang.Exception
Authorise change of rule class.
The current rule is being used to dictate the behavior of the owning object. This method is called when the owning object wishes to change the current rule for a different rule, to see if the current rule allows another rule to replace it.
By default, the MQeRule class allows any non-null MQeRule object reference to replace it.
If you want to prevent a rule being replaced with a different rule, override this rule in a subclass, and throw an exception, for example, code=Except_Rule.
owner
- The object that owns this rule. The currrent rule class
determines the behavior of this method.thisRule
- A reference to a descendent of MQeRule that may or may
not replace the current rule.
MQeException
- Except_Rule, If this rule does not allow the active
rule for the owning object to be changed.
java.lang.Exception
public MQeRule newRule(Object owner, MQeRule thisRule) throws Exception { throw new MQeException(MQe.Except_Rule, "Disallowed by rule"); }
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |