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

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

public class ActivateSubscriptionMsg
extends ControlMsg

The ActivateSubscriptionMsg 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 ActivateSubscriptionMsg("SubscriptionName");
     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 activate the subscription "SubscriptionName" at the QCapture program.


Field Summary
protected  java.lang.String subscriptionName
           
 
Constructor Summary
ActivateSubscriptionMsg(java.lang.String subscriptionName)
          Craste a new ActivateSubscriptionMsg.
 
Method Summary
protected  void generateXML(java.lang.StringBuffer xmlDocument)
          Actually create the xml.
 java.lang.String getSubscriptionName()
          Get the subscription name.
 void setSubscriptionName(java.lang.String subscriptionName)
          Set the subscription 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

subscriptionName

protected java.lang.String subscriptionName
Constructor Detail

ActivateSubscriptionMsg

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

Parameters:
subscriptionName - The name of the subscription.
Method Detail

getSubscriptionName

public java.lang.String getSubscriptionName()
Get the subscription name.

Returns:
String The name of the subscription.

setSubscriptionName

public void setSubscriptionName(java.lang.String subscriptionName)
Set the subscription name.

Parameters:
subscriptionName - The name of the subscription to activate.

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.