com.ibm.broker.config.proxy
Class MQSubscription

java.lang.Object
  extended by com.ibm.broker.config.proxy.Subscription
      extended by com.ibm.broker.config.proxy.MQSubscription

public class MQSubscription
extends Subscription

Each MQSubscription object represents a single MQ subscription on a broker. Subscription objects are returned from a SubscriptionsProxy object. An example of its use is given below:

 
    ConfigManagerConnectionParameters cmcp =
          new MQConfigManagerConnectionParameters("localhost", 1414, "QMGR");
    ConfigManagerProxy cmp = ConfigManagerProxy.getInstance(cmcp);
    TopologyProxy tp = cmp.getTopology();
    BrokerProxy bp = tp.getBrokerByName("BROKER1");
    SubscriptionQuery sq = bp.createSubscriptionQuery();
    sq.setString(SubscriptionParameters.TOPIC, "topic%");
    sq.setString(SubscriptionParameters.MQ.QUEUE, "QUEUE");
    SubscriptionsProxy sp = sq.executeQuery();
 
    Enumeration mqSubs = sp.elements();
    while(mqSubs.hasMoreElements()) {
      MQSubscription mqSub = (MQSubscription)mqSubs.nextElement();
      ...
    }
 
 

com.ibm.broker.config.proxy.MQSubscription extends com.ibm.broker.config.proxy.Subscription

Responsibilities Represents an MQ subscription
Internal Collaborators None

 Change Activity:
 -------- ----------- -------------   ------------------------------------
 Reason:  Date:       Originator:     Comments:
 -------- ----------- -------------   ------------------------------------
 45920    2007-07-30  HDMPL           v6.1 release
 

Version:
Config/com/ibm/broker/config/proxy/MQSubscription.java, CMP, S000 1.2

Method Summary
 byte[] getCorrelId()
          Returns the CorrelId associated with this MQ subscription.
 java.lang.String getQueueManagerName()
          Returns the name of the queue manager associated with this MQ subscription.
 java.lang.String getQueueName()
          Returns the queue associated with this MQ subscription.
static Subscription getSubscriptionFromString(java.lang.String encodedData)
          Returns a new Subscription object that contains the information described in the encoded String.
 
Methods inherited from class com.ibm.broker.config.proxy.Subscription
delete, getBroker, getClient, getFilter, getRegistrationDate, getSubscriptionPoint, getTopicName, getUser, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getSubscriptionFromString

public static Subscription getSubscriptionFromString(java.lang.String encodedData)
Returns a new Subscription object that contains the information described in the encoded String.

Parameters:
encodedData - String encoded in the format used by the SubscriptionsProxy.
Returns:
Subscription Representation of the input string

getCorrelId

public byte[] getCorrelId()
Returns the CorrelId associated with this MQ subscription.

Returns:
the CorrelId

getQueueManagerName

public java.lang.String getQueueManagerName()
Returns the name of the queue manager associated with this MQ subscription.

Returns:
the queue manager

getQueueName

public java.lang.String getQueueName()
Returns the queue associated with this MQ subscription.

Returns:
the queue