java.lang.Object com.ibm.broker.config.proxy.AdministeredObject com.ibm.broker.config.proxy.CollectiveProxy
public class CollectiveProxy
extends AdministeredObject
Represents a totally connected set of pub/sub brokers.
In order to use CollectiveProxy 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); TopologyProxy t = cmp.getTopology(); CollectiveProxy b = t.getCollectiveByName("COL1");
com.ibm.broker.config.proxy.CollectiveProxy extends
com.ibm.broker.config.proxy.AdministeredObject
|
|
Responsibilities | Represents a list of Brokers that are totally connected. |
Internal Collaborators | None |
Change Activity: -------- ----------- ------------- ------------------------------------ Reason: Date: Originator: Comments: -------- ----------- ------------- ------------------------------------ 25103.1 2004-03-19 HDMPL v6 Release
Method | Description |
---|---|
void addBrokers(String[]) | Adds an array of broker UUIDs to this collective's list of members and sends the results to the Configuration Manager. |
boolean containsBroker(String) | Returns true if and only if the broker with the supplied UUID is a member of the collective. |
Enumeration getBrokerUUIDs() | Returns a Enumeration of all the brokers in the collective's list. |
ConfigurationObjectType getConfigurationObjectType() | Returns the ConfigurationObjectType associated with this AdministeredObject type. |
ConfigurationObjectType getConfigurationObjectTypeOfParent() | Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type. |
void moveBroker(String, CollectiveProxy) | Atomically removes the broker with the supplied name from the current collective and adds it to the supplied instance. |
void removeBrokers(String[]) | Removes a list of broker UUIDs from this collective's list of members and sends the results to the Configuration Manager. |
Properties withName(String) | Returns a new Properties object that has the name attribute set to the supplied String, and the type attribute to be the name of the subclass of AdministeredObject being used. |
Properties withUUID(String) | Returns a new Properties object that has the UUID attribute set to the supplied String, and the type attribute to be the name of the subclass of AdministeredObject being used. |
public void addBrokers(String[] list) throws ConfigManagerProxyLoggedExceptionAdds an array of broker UUIDs to this collective's list of members and sends the results to the Configuration Manager.
- Parameters
- list - List of broker UUIDs to add to the CollectiveProxy.
- Throws
ConfigManagerProxyLoggedException
if the new list of members could not be sent to the Configuration Manager.
public boolean containsBroker(String targetUUID) throws ConfigManagerProxyPropertyNotInitializedExceptionReturns true if and only if the broker with the supplied UUID is a member of the collective.
- Parameters
- targetUUID - String containing the UUID of the broker whose membership status of this collective is sought.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if the requested property is not yet known.
public Enumeration getBrokerUUIDs() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns a Enumeration of all the brokers in the collective's list.
- Returns
- Enumeration of broker UUID Strings.
- 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 void moveBroker(String name, CollectiveProxy newProxy) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException
Atomically removes the broker with the supplied name from the current collective and adds it to the supplied instance. Requires that a "batch" of operations (controlled using ConfigManagerProxy. beginUpdates(), clearUpdates() and sendUpdates() is NOT already in progress.
- Parameters
- name - The name of the broker to remove from this Collective
- newProxy - - The Collective to which the broker should be added.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if the topic corresponding to the supplied name could not be loaded because information on the parent topic (i.e. this) has not yet been supplied.- Throws
ConfigManagerProxyLoggedException
- if the broker with the supplied name does not exist as a child of the current collective, if a batch of requests was already in progress, or if the target is the same as the current collective.
public void removeBrokers(String[] list) throws ConfigManagerProxyLoggedException
Removes a list of broker UUIDs from this collective's list of members and sends the results to the Configuration Manager.
- Parameters
- list - List of brokers to remove from the CollectiveProxy.
- Throws
ConfigManagerProxyLoggedException
if the new list of members could not be sent to the Configuration Manager.
public static Properties withName(String name)Returns a new Properties object that has the name attribute set to the supplied String, and the type attribute to be the name of the subclass of AdministeredObject being used. This provides an easy way of supplying filters to the get
- Parameters
- name -
- Returns
- java.util.Properties - a new Properties object with the relevant key/value pairs set.
public static Properties withUUID(String uuid)Returns a new Properties object that has the UUID attribute set to the supplied String, and the type attribute to be the name of the subclass of AdministeredObject being used. This provides an easy way of supplying filters to the ManagedSubcomponent calls. For example, broker1.getExecutionGroup(ExecutionGroup.withUUID("1234")); will return the Execution Group with UUID "1234" that exists in broker1.
- Parameters
- uuid -
- Returns
- java.util.Properties - a new Properties object with the relevant key/value pairs set.