java.lang.Object com.ibm.broker.config.proxy.AdministeredObject com.ibm.broker.config.proxy.SubscriptionsProxy
public class SubscriptionsProxy
extends AdministeredObject
Represents a query of the Configuration Manager's broker subscriptions table, and the results.
In order to use SubscriptionsProxy objects, applications must first obtain handles to them. Here is an example of how to do this:
ConfigManagerConnectionParameters cmcp = new MQConfigManagerConnectionParameters("localhost", 1414, "QMGR"); ConfigManagerProxy cmp = ConfigManagerProxy.getInstance(cmcp); String topics = null; // all topics String brokers = "BROKER%"; // all brokers beginning 'BROKER' String users = null; // all users String subsPoints = null; // all subscriptions points GregorianCalendar start = null; // no start date GregorianCalendar end = new GregorianCalendar(); // to the present SubscriptionsProxy s = cmp.getSubscriptions(topics, brokers, users, subsPoints, start, end);Each ConfigManagerProxy can have multiple subscriptions queries active.
Note: Once a SubscriptionsProxy is populated with the results of a query (that is, when hasBeenUpdatedByConfigManager() returns true) - the object will receive no further updates from the Configuration Manager. This means that, even if the set of active subscriptions changes, the SubscriptionsProxy returned will only reflect the state of the subscriptions table at the point the query was made. Applications must call ConfigManagerProxy.getSubscriptions() again in order to receive updated information.
com.ibm.broker.config.proxy.SubscriptionsProxy extends
com.ibm.broker.config.proxy.AdministeredObject
|
|
Responsibilities | Represents an SQL query of the Configuration Manager's Subscriptions table and its results. |
Internal Collaborators | None |
Change Activity: -------- ----------- ------------- ------------------------------------ Reason: Date: Originator: Comments: -------- ----------- ------------- ------------------------------------ 25103.1 2004-03-22 HDMPL v6 Release
Method | Description |
---|---|
void deleteSubscriptions(Subscription[]) | Asks the Configuration Manager to delete the supplied subscriptions. |
Enumeration elements() | Returns an Enumeration of all Subscription objects available to the user that match this query. |
ConfigurationObjectType getConfigurationObjectType() | Returns the ConfigurationObjectType associated with this AdministeredObject type. |
ConfigurationObjectType getConfigurationObjectTypeOfParent() | Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type. |
int getSize() | Returns the number of Subscription objects available to the user. |
Subscription getSubscription(int) | Returns the Subscription at the supplied position in the list. |
public void deleteSubscriptions(Subscription[] subs) throws ConfigManagerProxyLoggedExceptionAsks the Configuration Manager to delete the supplied subscriptions.
Note: Any response message from the Configuration Manager resulting from this method will be sent to listeners of the ConfigManagerProxy object, because Subscriptions and SubscriptionsProxies cannot have AdministeredObjectListeners.
- Parameters
- subs - Array of subscription objects to delete.
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
public Enumeration elements() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns an Enumeration of all Subscription objects available to the user that match this query.
- Returns
- Enumeration of available Subscription objects
- Throws
ConfigManagerProxyPropertyNotInitializedException
if the requested property is not yet known.
public ConfigurationObjectType getConfigurationObjectType()Returns the ConfigurationObjectType associated with this AdministeredObject type.
- Returns
- ConfigurationObjectType associated with this class.
- Overrides
public ConfigurationObjectType getConfigurationObjectTypeOfParent()Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type.
- Returns
- ConfigurationObjectType associated with the logical parent of this class.
- Overrides
public int getSize() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the number of Subscription objects available to the user.
- Returns
- int Number of Subscription objects viewable.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if the requested property is not yet known.
public synchronized Subscription getSubscription(int position) throws ArrayIndexOutOfBoundsException, ConfigManagerProxyPropertyNotInitializedExceptionReturns the Subscription at the supplied position in the list.
- Parameters
- position - Number of the Subscription to return. The first entry in the SubscriptionProxy is at position 1.
- Returns
- Subscription The entry at the given element
- Throws
ArrayIndexOutOfBoundsException
if the value of the supplied position is less than one or greater than the number of viewable entries.- Throws
ConfigManagerProxyPropertyNotInitializedException
if the requested property is not yet known.