com.ibm.db2.tools.repl.publication
Class InvalidateSendQueueMsg

java.lang.Object
  |
  +--com.ibm.db2.tools.repl.publication.ControlMsg
        |
        +--com.ibm.db2.tools.repl.publication.InvalidateSendQueueMsg

public class InvalidateSendQueueMsg
extends ControlMsg

The InvalidateSendQueueMsg sends a message to QCapture asking it to invalidate the send queue and perform the error action specified in the publication.

An example of sending a message:

   try {
     ControlMsg msg = new InvalidateSendQueueMsg("SendQueueName");
     msg.send("QueueMgrName", "AdminQueueName");
   } catch (Exception e) {
     System.out.println("Message failed...error " + e);
   }
 
This will send a message on the "AdminQueueName" on queue manager "QueueMgrName" to invalidate the "SendQueueName" at the QCapture program.


Field Summary
protected  java.lang.String qName
           
 
Constructor Summary
InvalidateSendQueueMsg(java.lang.String qName)
          Craste a new InvalidateSendQueueMsg.
 
Method Summary
protected  void generateXML(java.lang.StringBuffer xmlDocument)
          Actually create the xml.
 java.lang.String getQueueName()
          Get the send queue name.
 void setQueueName(java.lang.String qName)
          Set the send queue name.
protected  void validate()
          This will valiadate that everything is present for the xml document to be created.
 
Methods inherited from class com.ibm.db2.tools.repl.publication.ControlMsg
getXML, send, send, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

qName

protected java.lang.String qName
Constructor Detail

InvalidateSendQueueMsg

public InvalidateSendQueueMsg(java.lang.String qName)
Craste a new InvalidateSendQueueMsg. The message is not sent until the send() message is called.

Parameters:
qName - The name of the send queue to invalidate.
Method Detail

getQueueName

public java.lang.String getQueueName()
Get the send queue name.

Returns:
String The name of the send queue to invalidate.

setQueueName

public void setQueueName(java.lang.String qName)
Set the send queue name.

Parameters:
qName - The name of the send queue to invalidate.

validate

protected void validate()
                 throws java.lang.Exception
This will valiadate that everything is present for the xml document to be created. It will throw an exception if something is not valid.

Overrides:
validate in class ControlMsg
java.lang.Exception

generateXML

protected void generateXML(java.lang.StringBuffer xmlDocument)
Actually create the xml.

Overrides:
generateXML in class ControlMsg
Parameters:
xmlDocument - Generate the xml here.