java.lang.Object com.ibm.broker.config.proxy.SubscriptionQuery
public class SubscriptionQuery
extends Object
This class allows applications to query the subscriptions a broker currently holds. There is an example of how the class can be used:
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, "topicA"); SubscriptionsProxy sp = sq.executeQuery();
Field | Description |
---|---|
copyright | IBM Copyright |
sccsid | Version information |
Method | Description |
---|---|
SubscriptionsProxy executeQuery() | Executes the subscription query specified by this SubscriptionQuery object against the broker. |
void setBytes(String, byte[]) | Sets a parameter of type byte[] in this SubscriptionQuery object. |
void setDate(String, GregorianCalendar) | Sets a parameter of type GregorianCalendar in this SubscriptionQuery object. |
void setQueryLimit(int) | Sets the query limit for this SubscriptionQuery. |
void setString(String, String) | Sets a parameter of type java.lang.String in this SubscriptionQuery object. |
protected static final java.lang.String copyrightIBM Copyright
protected static final java.lang.String sccsidVersion information
public SubscriptionsProxy executeQuery() throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedExceptionExecutes the subscription query specified by this SubscriptionQuery object against the broker.
- Returns
- SubscriptionsProxy Object containing the Subscription Objects that matched the subscription query. The object will be asynchronously populated with the matching results.
- Throws
- Throws
public void setBytes(String parameterName, byte[] bytes)Sets a parameter of type byte[] in this SubscriptionQuery object. The parameter must one of the byte[] parameters declarded in the class SubscriptionParameter.
- Parameters
- parameterName - The parameter to be set.
- string - The byte[] value to set the parameter to.
- Throws
IllegalArgumentException
If the parameter being set is not of type byte[]
public void setDate(String parameterName, GregorianCalendar date)Sets a parameter of type GregorianCalendar in this SubscriptionQuery object. The parameter must one of the GregorianCalendar parameters declarded in the class SubscriptionParameters.
- Parameters
- parameterName - The parameter to be set.
- string - The byte[] value to set the parameter to.
- Throws
IllegalArgumentException
If the parameter being set is not of type GregorianCalendar
public void setQueryLimit(int queryLimit)Sets the query limit for this SubscriptionQuery. This sets the maxium number of subscription objects that will be returned when the query is executed.
- Parameters
- queryLimit - The query limit.
public void setString(String parameterName, String string)Sets a parameter of type java.lang.String in this SubscriptionQuery object. The parameter must one of the java.lang.String parameters declarded in the class SubscriptionParameter.
- Parameters
- parameterName - The parameter to be set.
- string - The string value to set the parameter to. '%' can be used within the string to denote a wildcard.
- Throws
IllegalArgumentException
If the parameter being set is not of type java.lang.String