|
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.MQeUndeliveredMessageRule
To be a model rules class. This is the basic class from which dictates what action a listener administered MQBridge object should do if the message is undelivered for a specific reason.
The class name will be placed in the configuration of the listener object.
The class will be loaded dynamically if the listener cannot deliver a message.
This rules class must decide which action to perform: Either to retry after a number of seconds of waiting, moving the message to the MQ dead letter queue, or stopping the listener altogether.
This model class has the some behaviour as an example: It will return a value of
Field Summary | |
static int |
STOP_LISTENER
The value that can be returned which will cause the listener to stop. |
static int |
USE_MQ_REPORT_OPTIONS
The value that can be returned which will cause the listener to put the message onto the MQ dead letter queue, or discard it (depending on the report options set inside the MQ message). |
static short[] |
version
|
Constructor Summary | |
MQeUndeliveredMessageRule()
|
Method Summary | |
java.lang.Object |
permit(java.lang.Object failureCodesO,
java.lang.Object targetNamesO,
java.lang.Object failedMQeMessageO)
To find out what behaviour should occur in the listener when a message cannot be delivered, but may benefit from a retry at a later date. |
protected java.lang.Integer |
permitUndeliveredMessage(int[] failureCodes,
java.lang.String[] targetNames,
MQeMsgObject failedMQeMessage)
Exactly the same as the permit() method on this class, except the parameters are provided in strongly-typed form. |
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 STOP_LISTENER
public static final int USE_MQ_REPORT_OPTIONS
Constructor Detail |
public MQeUndeliveredMessageRule()
Method Detail |
public java.lang.Object permit(java.lang.Object failureCodesO, java.lang.Object targetNamesO, java.lang.Object failedMQeMessageO) throws java.lang.Exception
The listener has a number of conditions under which a message cannot be delivered to the MQe network.
Whenever an MQ Message cannot be put to MQe a rule class like this can decide on which course of action to take.
The listener should stop as a result of this message being undeliverable.
The message should either be discarded or moved to the MQ dead letter queue, depending on the value of the original 'report' field of the original MQ Message.
The number of seconds which the listener should wait before retrying the MQ-to-MQe transfer operation.
If a value not in the list above is specified, or if the rule throws an exception, then the listener will assume the STOP_LISTENER result was returned.
Fails
- if the rule has some problem with it's logic.
This will have the same result as returning the STOP_LISTENER value
in terms of how the listener will react.
java.lang.Exception
protected java.lang.Integer permitUndeliveredMessage(int[] failureCodes, java.lang.String[] targetNames, MQeMsgObject failedMQeMessage) throws java.lang.Exception
This model class has the some behavior as an example: It will return a value of
java.lang.Exception
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |