java.lang.Object com.ibm.broker.config.proxy.Subscription 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 if 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(); ... }
Field | Description |
---|---|
copyright | IBM Copyright |
sccsid | Version information |
Constructor | Description |
---|---|
MQSubscription(String, String, String, String, String, String, String, String, String, String, byte[]) | Protected constructor used to create an instance of ths class |
Method | Description |
---|---|
byte[] getCorrelId() | Returns the CorrelId associated with this MQ subscription. |
String getQueueManagerName() | Returns the name of the queue manager associated with this MQ subscription. |
String getQueueName() | Returns the queue associated with this MQ subscription. |
Subscription getSubscriptionFromString(String) | Returns a new Subscription object that contains the information described in the encoded String. |
protected static final java.lang.String copyrightIBM Copyright
protected static final java.lang.String sccsidVersion information
protected MQSubscription(String uuid, String topicName, String user, String subscriptionPoint, String registrationDate, String client, String filter, String broker, String queueManagerName, String queueName, byte[] correlId)Protected constructor used to create an instance of ths class
- Parameters
- uuid -
- topicName -
- user -
- subscriptionPoint -
- registrationDate -
- client -
- filter -
- broker -
- queueManagerName -
- queueName -
- correlId -
public byte[] getCorrelId()Returns the CorrelId associated with this MQ subscription.
- Returns
- the CorrelId
public String getQueueManagerName()Returns the name of the queue manager associated with this MQ subscription.
- Returns
- the queue manager
public String getQueueName()Returns the queue associated with this MQ subscription.
- Returns
- the queue
public static Subscription getSubscriptionFromString(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