Websphere MQ Everyplace

com.ibm.mqe
Class MQeQueueRule

java.lang.Object
  |
  +--com.ibm.mqe.MQe
        |
        +--com.ibm.mqe.MQeRule
              |
              +--com.ibm.mqe.MQeQueueRule
All Implemented Interfaces:
MQeExceptionCodes
Direct Known Subclasses:
QueueLoggerRule

public class MQeQueueRule
extends MQeRule

Queue rules control the behaviour of WebSphere MQ Everyplace queues. The queue rules are activated by the queue when it is itself activated. During the operation of the queue, the rules are called when certain events occur, for example, when a message is put, a message expires, or a duplicate message arrives. The rules then determine how the queue handles these events.

The base set of queue rules is defined in this class, which should be extended if a solution wishes to alter queue behaviour.

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
 
Fields inherited from class com.ibm.mqe.MQe
Admin_Queue_Name, Admin_Reply_Queue_Name, copyright, DeadLetter_Queue_Name, Event_Activate, Event_Attribute, Event_Authenticate, Event_Close, Event_Logoff, Event_Logon, Event_MiniCert_Validate, Event_Queue, Event_QueueManager, Event_UserBase, JMS_Version, MQ_Headers, MQe_Log_Audit_Failure, MQe_Log_Audit_Success, MQe_Log_Error, MQe_Log_Information, MQe_Log_Success, MQe_Log_Warning, Msg_BackoutCount, Msg_CorrelID, Msg_ExpireTime, Msg_LockID, Msg_MsgID, Msg_OriginQMgr, Msg_Priority, Msg_ReplyToQ, Msg_ReplyToQMgr, Msg_Resend, Msg_Style, Msg_Style_Datagram, Msg_Style_Reply, Msg_Style_Request, Msg_Time, Msg_WrapMsg, sccsid, System_Default_Queue_Name, version
 
Fields inherited from interface com.ibm.mqe.MQeExceptionCodes
Except_Active, Except_AdapterException, Except_AdapterMissingRemoteAddress, Except_Admin_ActionNotSupported, Except_Admin_InvalidField, Except_Admin_NotAdminMsg, Except_AdminAction, Except_Authenticate, Except_BadRequest, Except_BridgeListener, Except_Chnl_Attributes, Except_Chnl_ID, Except_Chnl_Limit, Except_Chnl_Overrun, Except_Closed, Except_Con_AdapterRequired, Except_Con_AliasAlreadyExists, Except_Con_AlreadyExists, Except_Con_InvalidName, Except_Connect_Failure, Except_ConnectonType, Except_Cryptor, Except_Data, Except_Duplicate, Except_JmxProperties, Except_Listener, Except_MessageStore, Except_MiniCertReg_ActivateFailed, Except_MiniCertReg_BadPIN, Except_MiniCertReg_NotOpen, Except_NotActive, Except_NotAllowed, Except_NotFound, Except_NotSupported, Except_PrivateReg_ActivateFailed, Except_PrivateReg_BadPIN, Except_PrivateReg_NotOpen, Except_PublicReg_ActivateFailed, Except_PublicReg_InvalidAddress, Except_PublicReg_InvalidRequest, Except_Q_Full, Except_Q_InvalidName, Except_Q_InvalidPriority, Except_Q_MsgTooLarge, Except_Q_NoMatchingMsg, Except_Q_TargetRegistryRequired, Except_QMgr_Activated, Except_QMgr_AlreadyExists, Except_QMgr_InvalidQMgrName, Except_QMgr_InvalidQName, Except_QMgr_NotActive, Except_QMgr_NotBridgeEnabled, Except_QMgr_NotConfigured, Except_QMgr_QDoesNotExist, Except_QMgr_QExists, Except_QMgr_QNotEmpty, Except_QMgr_RegistryDataVersion, Except_QMgr_UnknownQMgr, Except_QMgr_WrongQType, Except_Reg_AddFailed, Except_Reg_AlreadyExists, Except_Reg_AlreadyOpen, Except_Reg_CRTKeyDecFailed, Except_Reg_CRTKeySignFailed, Except_Reg_DeleteFailed, Except_Reg_DeleteRegistryFailed, Except_Reg_DoesNotExist, Except_Reg_InvalidSession, Except_Reg_ListFailed, Except_Reg_NotDefined, Except_Reg_NotSecure, Except_Reg_NullName, Except_Reg_OpenFailed, Except_Reg_ReadFailed, Except_Reg_RenameFailed, Except_Reg_ResetPINFailed, Except_Reg_SearchFailed, Except_Reg_UpdateFailed, Except_RemoteException, Except_Rule, Except_S_BadIntegrity, Except_S_BadSubject, Except_S_CertificateExpired, Except_S_Cipher, Except_S_InvalidAttribute, Except_S_InvalidSignature, Except_S_MiniCertNotAvailable, Except_S_MissingSection, Except_S_NoPresetKeyAvailable, Except_S_RegistryNotAvailable, Except_Stopped, Except_Syntax, Except_TimeOut, Except_Transporter, Except_TriggerTransmission, Except_Trnsport_QMgr, Except_Trnsport_Request, Except_Type, Except_UdpipAdapterStateException, Except_UdpipAdapterTimeOut, Except_UdpipAdapterUnableToConfirmSuccess, Except_UnCoded, Except_Uncontactable_DontTransmit
 
Constructor Summary
MQeQueueRule()
           
 
Method Summary
 void addListener(MQeMessageListenerInterface listener, MQeFields filter)
          This rule is called when a message listener is attached to the queue.
 void attributeChange(MQeAttribute attribute)
          This rule is called when an attempt is made to change the queue’s attribute.
 boolean browseMessage(MQeMsgObject msg, long confirmID)
          The rule decides whether to allow the message to be included in the set of messages returned to the application that issued the browse request.
 void deleteMessage(MQeFields filter)
          This rule is called when a delete message operation takes place.
 void duplicateMessage(MQeMsgObject msg, long confirmID)
          This rule is called if a duplicate message is put onto the queue.
 boolean filterMessage(int what, MQeFields filter)
          This rule is called when a message filter is being applied during a getMessage(), browseMessage() or deleteMessage() method call.
 boolean getMessage(MQeMsgObject msg, long confirmID)
          This rule is called when a message is found that satisfies a get message request.
 void getPendingMessage(java.lang.String queueManagerName, MQeFields filter, long confirmID)
          Deprecated. as of MQe version 2 this method is no longer invoked
 void indexEntry(MQeFields entry, MQeMsgObject msg)
          Deprecated. This is deprecated as this method is no longer used.
 boolean messageExpired(MQeFields entry, MQeMsgObject msg)
          This rule is called to notify when a message has exceeded either the queue’s expiry interval, or its own expiry interval.
 void messageMoved(MQeMsgObject msg, java.lang.String queueManager, java.lang.String queue)
          This rule is called when a message has been moved form a Async Queue or a StoreForward Queue.
 void putMessage(MQeMsgObject msg, long confirmID)
          This rule is called when a put message request is made.
 void queueActivate()
          This rule is called when the queue is activated.
 void queueClose()
          This rule is called when the queue is closed.
 void removeListener(MQeMessageListenerInterface Listener, MQeFields filter)
          This rule is called when a message listener is removed from a queue.
 void resetMessageLock(MQeFields filter)
          Deprecated. This is deprecated as this rule is no longer used.
 boolean transmitMessage(MQeMsgObject msg, java.lang.String targetQMgr)
          Called before a request is made to transmit a message from a remote queue or a store and forward queue If the method returns false then no attempt will be made to transmit the message to the target queue manager.
 boolean undo(MQeFields filter)
          This rule is called when an undo operation occurs.
 void useCountChanged(int useCount)
          Deprecated. This is deprecated as this method is no longer used.
 
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
 

Constructor Detail

MQeQueueRule

public MQeQueueRule()
Method Detail

addListener

public void addListener(MQeMessageListenerInterface listener,
                        MQeFields filter)
                 throws java.lang.Exception

This rule is called when a message listener is attached to the queue.

By throwing an exception the rule is able to reject the add listener request.

Parameters:
listener - A reference to the object that is subscribing to WebSphere MQ Everyplace message events. The object must implement MQeMessageListenerInterface.
filter - null or an MQeFields object containing message fields. A value of null means that the listener wishes to receive events for all messages on the queue.

Specifying an MQeFields object containing message fields means that the listener is only interested in events concerning messages whose fields match those contained in the filter.

Returns:
void
Throws:
java.lang.Exception
Example:
 // This rule logs the addition of a message listener 
 public void addListener(MQeMessageListenerInterface listener,
     MQeFields filter) throws Exception {
     
     log(MQe_Log_Information, Event_Queue_AddMsgListener,
         "Added listener on queue " +
         ((MQeQueueProxy) owner).getQueueManagerName() + "+" +
         ((MQeQueueProxy) owner).getQueueName());        
     }
 

attributeChange

public void attributeChange(MQeAttribute attribute)
                     throws java.lang.Exception

This rule is called when an attempt is made to change the queue’s attribute. The attribute defines the authenticator, cryptor and compressor used on the queue. Messages are stored using the attributes defined.

The messages held on the queue can be protected by an authenticator and cryptor. The messages can also be compressed by using a compressor. Together, the authenticator, cryptor, and compressor are known as the attributes of the queue, and they are defined by specifying an appropriate MQeAttribute object to be associated with the queue. This rule is called whenever an attempt is made to replace the queue’s attribute.

Note: Changing a queue’s attribute when it already holds messages stored using another attribute, may cause message loss, since the message may not be recoverable using the new attribute.

By throwing an exception the rule is able to reject the attribute change request.

Parameters:
attribute - null , or an MQeAttribute object that defines the authenticator, cryptor and compressor that will be used on the queue, if the change is allowed. null means that no attribute will be used on the queue.
Returns:
void
Throws:
java.lang.Exception
Example:
 // This rule only allows the queue's attribute to be changed if it was     
 // not previously set 
 
 // The MQeQueueProxy object is the owner of the rule 
 public void attributeChange(MQeAttribute attribute)throws Exception {
     
     if (((MQeQueueProxy) owner).getQueueAttribute() != null) {
         throw new MQeException(Except_Rule, "Attribute already set");        
     }
     }
 

browseMessage

public boolean browseMessage(MQeMsgObject msg,
                             long confirmID)
                      throws java.lang.Exception

The rule decides whether to allow the message to be included in the set of messages returned to the application that issued the browse request.

A browse messages operation matches zero or more messages held on a queue. This method is called for every message matched. The rule decides whether to allow the message to be included in the set of messages returned to the application that issued the browse request.

If this rule throws an exception then the browse operation will be terminated.

Parameters:
msg - An MQeMsgObject containing the message being browsed.
confirmID - A long value that is the confirmID used on this browse operation. The confirmID is used to restore messages in the event of a failure.
Returns:
A boolean value that denotes whether to allow this message to be included in the set of messages returned to the application that issued the browse request.
 True   -  Allow the message to be included
 False  -  Do not allow the message to be included
 
Throws:
java.lang.Exception
Example:
 // This rule only allows messages of type 'OrderResponse' to be browsed 
 public boolean browseMessage(MQeMsgObject msg,
     long confirmID) throws Exception {
     
     // get message type field
     String msgType = msg.getAscii("MsgType");
 
     // what message type is it?
     if (msgType.equals("OrderResponse")) {
         return (true);     // allow browse
     } else {
         return (false);    // don't allow browse         
     }
     }
 

deleteMessage

public void deleteMessage(MQeFields filter)
                   throws java.lang.Exception

This rule is called when a delete message operation takes place.

By throwing an exception the rule can reject the delete message request.

Parameters:
filter - An MQeFields object containing a message filter. The filter must contain the message UID for the delete operation to be successful.
Returns:
void
Throws:
java.lang.Exception
Example:
 // This rule requires that the filter contain a password 
 public void deleteMessage(MQeFields filter)  throws Exception {
     
     if (filter != null && filter.contains("Password")) {
         String pswd = filter.getAscii("Password");
 
         if (pswd.equals("12345678")) {
             // remove password from filter 
             filter.delete("Password");                
         } else {
             throw new MQeException(Except_Rule, "Incorrect password");
         }
     } else {
         throw new MQeException(Except_Rule, "No Password");        
     }
     }
 

duplicateMessage

public void duplicateMessage(MQeMsgObject msg,
                             long confirmID)
                      throws java.lang.Exception

This rule is called if a duplicate message is put onto the queue.

Parameters:
msg - An MQeMsgObject containing the duplicate message.
confirmID - A long value that is the confirmID used on this put operation. The confirmID is used to restore messages in the event of a failure.
Returns:
void
Throws:
java.lang.Exception -

Note : This exception is retained for backward compatibility only and any exception thrown in this method will be caught and ignored.

Example:
 // This rule logs the duplicate message exception 
 public void duplicateMessage(MQeMsgObject msg,
     long confirmID) throws Exception {
     
     // get message UID
     MQeFields msgUID = msg.getMsgUIDFields();
 
     // log the duplicate message exception 
     log(MQe_Log_Warning, Event_Queue_Duplicate,
         msgUID.getAscii(MQe.Msg_OriginQMgr) + "+" +
         msgUID.getLong(MQe.Msg_Time));        
     }
 

filterMessage

public boolean filterMessage(int what,
                             MQeFields filter)

This rule is called when a message filter is being applied during a getMessage(), browseMessage() or deleteMessage() method call.

The queue rule checks to make sure certain fields exist in the filter, and that they contain certain values. The rule then uses this information to allow or reject the operation.

Parameters:
what - An integer, indicating which operation is being performed:
  • 0 = browse
  • 1 = get
  • 2 = delete
filter - An MQeFields object: null or the search filter used to restrict the operation to a subset of messages on the queue.
Returns:
A boolean
 true    -   Allow the requested operation to go ahead.
 false   -   Reject the requested operation.
 
Throws:
none
See Also:
getMessage(com.ibm.mqe.MQeMsgObject, long), browseMessage(com.ibm.mqe.MQeMsgObject, long), deleteMessage(com.ibm.mqe.MQeFields)
Example:
 public boolean filterMessage(int what, MQeFields filter) {
     
     //Allow all operations by default,regardless of filter.
     return true;        
     }
 

getMessage

public boolean getMessage(MQeMsgObject msg,
                          long confirmID)
                   throws java.lang.Exception

This rule is called when a message is found that satisfies a get message request. The rule can decide whether the message should be allowed to satisfy the get message request.

If the rule does not allow the message to satisfy the get message request then the queue will search for another message that satisfies the request.

By throwing an exception the rule can terminate the get message request.

Parameters:
msg - An MQeMsgObject containing a message that satisfies the get message request.
confirmID - A long value that is the confirmID used on this get request. The confirmID is used to restore messages in the event of a failure.
Returns:
A Boolean
 true    -   Allow the requested operation to go ahead
 false   -   Reject the requested operation
 
Throws:
java.lang.Exception
See Also:
putMessage(com.ibm.mqe.MQeMsgObject, long)
Example:
 // This rule disallows a get request on a message if the message states     
 // that it can only be browsed 
 public boolean getMessage(MQeMsgObject msg,
     long confirmId) throws Exception {
     boolean result = true;
 
     // does the message contain a field which states what operations are 
     // allowed upon it 
     if (msg.contains("AllowableOperations")) {
         String allowedOperations = msg.getAscii("AllowableOperations");
 
         // if the message states that it can only be browsed disallow the get 
         if (allowedOperations.equals("BrowseOnly")) {
             result = false;
         }
     }
     return (result);        
     }
 

getPendingMessage

public final void getPendingMessage(java.lang.String queueManagerName,
                                    MQeFields filter,
                                    long confirmID)
                             throws java.lang.Exception
Deprecated. as of MQe version 2 this method is no longer invoked

This rule is called when a get pending message request is received.

An WebSphere MQ Everyplace queue manager is able to collect messages destined for itself from its home-server through a home-server queue. The home-server stores messages destined for its clients in one or more store-and-forward queues. The home-server queue contacts its home-server’s store-and-forward queues using the MQeStoreAndForwardQueue.getPendingMessage() method. Any pending messages for that WebSphere MQ Everyplace queue manager are then returned.

Parameters:
queueManagerName - A String containing the name of the WebSphere MQ Everyplace queue manager that initiated the get pending message request.
filter - null or an MQeFields object containing a message filter, used to match any pending messages. null means return the first available message addressed to the queue manager specified in queueManagerName.
confirmID - A long value that is the confirmID for this operation. The confirmID is used to restore messages in the event of a failure.
Returns:
void
Throws:
java.lang.Exception

indexEntry

public final void indexEntry(MQeFields entry,
                             MQeMsgObject msg)
                      throws java.lang.Exception
Deprecated. This is deprecated as this method is no longer used.

This rule is called whenever an index entry is created.

This occurs when a new message is put onto the queue.

The index entry contains state information about the message, along with certain index fields that are held to enable faster message searching.

Parameters:
entry - An MQeFields object that is the index entry for a message.
msg - An MQeMsgObject containing the message for which an index entry is being created.
Returns:
void
Throws:
java.lang.Exception

messageExpired

public boolean messageExpired(MQeFields entry,
                              MQeMsgObject msg)
                       throws java.lang.Exception

This rule is called to notify when a message has exceeded either the queue’s expiry interval, or its own expiry interval.

If a message has remained on the queue for a length of time greater than the queue’s expiry interval, or if a message exceeds its own expiry interval then this the message will be expired as soon as this situation is detected. This rule is then called to notify the rule implementor of the expiry. The implementor may choose to take any action as a result of this notification, but typically might place the message on a ’dead letter queue’.

Parameters:
entry - An MQeFields null value maintained for backward compatibility.
msg - An MQeMsgObject containing the message that has expired.
Returns:
A boolean value which is kept for backward compatibility only and is ignored
Throws:
java.lang.Exception -

Note : This exception is retained for backward compatibility only and any exception thrown in this method will be caught and ignored.

Example:
 // This rule puts a copy of any expired messages to a Dead Letter Queue 
 public boolean messageExpired(MQeFields entry,
     MQeMsgObject msg) throws Exception {
     
     // Get the reference to the Queue Manager 
     MQeQueueManager qmgr = MQeQueueManager.getDefaultQueueManager();
 
     // need to set re-send flag so that put of message to new queue isn't 
     // rejected 
     msg.putBoolean(MQe.Msg_Resend, true);
 
     // if the message contains an expiry interval field, remove it 
     if (msg.contains(MQe.Msg_ExpireTime)) {
         msg.delete(MQe.Msg_ExpireTime);
     }
     // put message onto dead letter queue 
     qmgr.putMessage(null, "DEAD.LETTER.QUEUE", msg, null, 0);
     // return true (the return code is ignored) 
     return (true);        
     }
 

putMessage

public void putMessage(MQeMsgObject msg,
                       long confirmID)
                throws java.lang.Exception

This rule is called when a put message request is made.

By throwing an exception the rule can prevent the message being put onto the queue.

Parameters:
msg - An MQeMsgObject containing the message to be put onto the queue.
confirmID - A long value containing the confirmID for this operation. The confirmID is used to restore locked messages in the event of a failure.
Returns:
void
Throws:
java.lang.Exception
Example:
 // This rule blocks a message Put if the message priority is less than 5 
 public void putMessage(MQeMsgObject msg, long confirmID) throws Exception {
     
     if ((msg.contains(MQe.Msg_Priority)) &&
         (msg.getByte(MQe.Msg_Priority) < 5)) {
         throw new MQeException(Except_Rule, "Priority too low");        
     }
     }
 

queueActivate

public void queueActivate()

This rule is called when the queue is activated.

Returns:
void
Throws:
none
Example:
 // This rule logs the activation of the queue 
 public void queueActivate() {
     
     try {
         logFile = new LogToDiskFile("log.txt");
         log(MQe_Log_Information, Event_Queue_Activate, "Queue " +
             ((MQeQueueProxy) owner).getQueueManagerName() + "+" +
             ((MQeQueueProxy) owner).getQueueName() + "active");
     } catch (Exception e) {
         e.printStackTrace(System.err);
     }        
     }
 

queueClose

public void queueClose()

This rule is called when the queue is closed.

Returns:
void
Throws:
none
Example:
 // This rule logs the closure of the queue 
 public void queueClose() {
        
     try {
         log(MQe_Log_Information, Event_Queue_Closed, "Queue " +
             ((MQeQueueProxy) owner).getQueueManagerName() + "+" +
             ((MQeQueueProxy) owner).getQueueName() + "closed");
         // close log file 
         logFile.close();
     } catch (Exception e) {
         e.printStackTrace(System.err);
     }        
     }
 

removeListener

public void removeListener(MQeMessageListenerInterface Listener,
                           MQeFields filter)
                    throws java.lang.Exception

This rule is called when a message listener is removed from a queue.

By throwing an exception the rule can prevent the listener from being removed.

Parameters:
Listener - The object that is subscribing to WebSphere MQ Everyplace message events. The object must implement MQeMessageListenerInterface.
filter - null or an MQeFields object containing a message filter. The filter must match the filter used in the add listener command that created this listener.
Returns:
void
Throws:
java.lang.Exception
Example:
 // This rule logs the removal of the message listener 
 public void removeListener(MQeMessageListenerInterface listener,
     MQeFields filter) throws Exception {
     
     log(MQe_Log_Information, Event_Queue_RemoveMsgListener,
         "Removed listener on queue " +
         ((MQeQueueProxy) owner).getQueueManagerName() + "+" +
         ((MQeQueueProxy) owner).getQueueName());        
     }
 

resetMessageLock

public final void resetMessageLock(MQeFields filter)
                            throws java.lang.Exception
Deprecated. This is deprecated as this rule is no longer used.

This rule is called when a request is made to reset the lock state on a message. The message is reset to an unlocked state.

This function can only be performed by Websphere MQ administration. By throwing an exception the rule can prevent the reset from occurring.

Parameters:
filter - An MQeFields object containing a message filter. This filter is used to match the message having its lock state reset.
Returns:
void
Throws:
java.lang.Exception

transmitMessage

public boolean transmitMessage(MQeMsgObject msg,
                               java.lang.String targetQMgr)
                        throws java.lang.Exception

Called before a request is made to transmit a message from a remote queue or a store and forward queue If the method returns false then no attempt will be made to transmit the message to the target queue manager. This will also prevent any other messages destined for the target queue manager from being transmitted on the current transmit cycle.

Parameters:
msg - A reference to the message that is pending transmission.
targetQMgr - Name of the queue manager the message is targetted at.
Returns:
a boolean
                                         
    true   - allow message to be transmitted                               
    false  - prevent message from being transmitted 
 
Throws:
java.lang.Exception
Example:
 // This rule only allows transmission of the given message if
 // its priority is greater than 4 
 public boolean transmitMessage(MQeMsgObject msg, String targetQMgr)
     throws Exception { 
     boolean result = true;
 
     if (!msg.contains(MQe.Msg_Priority) || 
         ((msg.contains(MQe.Msg_Priority)) &&
             (msg.getByte(MQe.Msg_Priority) < 5))) {
         result = false;
     } else {
         result = true;
     }
     return result;                 
     }
 

Note : This exception is retained for backward compatibility only and any exception thrown in this method will be caught and ignored.


undo

public boolean undo(MQeFields filter)
             throws java.lang.Exception

This rule is called when an undo operation occurs. An undo message operation matches zero or more messages held on a queue. This rule is called for each message matched.

Returns:
A boolean value which is retained for backward compatibility only and will be ignored.
Throws:
java.lang.Exception -

Note : This exception is retained for backward compatibility only and any exception thrown in this method will be caught and ignored.

Example:
 // This rule logs the message reset 
 public boolean undo(MQeFields filter) throws Exception { 
     
     // get message UID 
     if (filter.contains(MQe.Msg_Time) &&
         filter.contains(MQe.Msg_OriginQMgr)) {
         String originQMgr = filter.getAscii(MQe.Msg_OriginQMgr);
         long timeStamp = filter.getLong(MQe.Msg_Time);
 
         log(MQe_Log_Information, Event_Queue_ResetMessageLock,
             "Message " + originQMgr + ":" + timeStamp + "on queue " +
             ((MQeQueueProxy) owner).getQueueManagerName() + "+" +
             ((MQeQueueProxy) owner).getQueueName() + "has been reset");
     }
     return (true);        
     }
 

useCountChanged

public final void useCountChanged(int useCount)
                           throws java.lang.Exception
Deprecated. This is deprecated as this method is no longer used.

This rule is called every time the queue's use count is changed.

The use count is a measure of the number of users attached to the queue. The use count changes when the queue is activated or closed, and when remote queue managers connect to, or disconnect from, the queue using an MQeTransporter.

Parameters:
useCount - The queue’s current use count.
Returns:
void
Throws:
java.lang.Exception

messageMoved

public void messageMoved(MQeMsgObject msg,
                         java.lang.String queueManager,
                         java.lang.String queue)
This rule is called when a message has been moved form a Async Queue or a StoreForward Queue. This will be called just before the message is finally deleted on the sending QueueManager. This has the result that should a crash occur either in this rule or before finally removing the message an extra confirmation flow could occur - and this rule called again.

If the message has been moved from a Store/Forward Queue, and/or has been subject to security, this message will be wrapped. It will be necassary to "unwrap" the mesasge. For the case where security has been applied to a message on a Store/Forward Queue then issue 2 unwraps. The first for the Store/Forward Queue Wrapper (with no attribute) and then call unwrap again supplying the correct attribute.

Parameters:
msg - The message that has just been moved
queueManager - The QueueManager to which the message is destined
queue - The Queue to which the message is destined.
See Also:
MQeMsgObject.unwrapMsgObject(com.ibm.mqe.MQeAttribute)

Websphere MQ Everyplace