Class Hierarchy All Classes All Fields and Methods

Class com.ibm.broker.config.proxy.TopologyProxy

java.lang.Object
        com.ibm.broker.config.proxy.AdministeredObject
                com.ibm.broker.config.proxy.TopologyProxy

public class TopologyProxy
extends AdministeredObject

There is exactly one Topology associated with each Configuration Manager, and this is referenced by the TopologyProxy object.

In order to use TopologyProxy 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();
 

com.ibm.broker.config.proxy.TopologyProxy extends com.ibm.broker.config.proxy.AdministeredObject

Responsibilities Represents a container for all Brokers and the links between them.
Internal Collaborators com.ibm.broker.config.proxy.BrokerProxy
com.ibm.broker.config.proxy.CollectiveProxy

 
 Change Activity:
 --------- ----------- ------------- ------------------------------------
 Reason:   Date:       Originator:   Comments:
 --------- ----------- ------------- ------------------------------------
 f25103.7  2004-03-18  HDMPL         v6 Release
 
 

Inner Class Index
Class Description
TopologyProxy.Connection A small data structure representing a connection between two brokers in the topology.
Method Index
Method Description
void addAccessControlEntries(AccessControlEntry[]) Adds this list to the list of access control entries that applies to this object.
BrokerProxy createBroker(String, String) Asks the Configuration Manager to add a broker with the supplied name and queue manager to the Topology workspace.
CollectiveProxy createCollective(String) Asks the Configuration Manager to create a collective with the supplied name.
void createConnectionByName(String, String) Asks the Configuration Manager to create a logical connection between two brokers.
void createConnectionByUUID(String, String) Asks the Configuration Manager to create a logical connection between two brokers by UUID.
void deleteBroker(String) Asks the Configuration Manager to remove the broker with the supplied name from the Topology workspace.
DeployResult deleteBroker(String, long) Asks the Configuration Manager to remove the broker with the supplied name from the Topology workspace.
void deleteCollective(String) Asks the Configuration Manager to remove the collective with the supplied name from the Topology workspace.
void deleteConnectionByName(String, String) Asks the Configuration Manager to remove a logical connection between two brokers.
void deleteConnectionByUUID(String, String) Asks the Configuration Manager to remove a logical connection between two brokers.
void deploy() Deploys any changes made to the pub/sub topology since the last pub/sub topology deploy to the affected brokers.
void deploy(boolean) Deploys the pub/sub topology configuration to brokers.
DeployResult deploy(boolean, long) Deploys the pub/sub topology configuration to brokers.
AccessControlEntry[] getAccessControlEntries() Creates and returns a set of AccessControlEntry objects that describes the set of (principal,permission) tuples that have been applied specifically to this object.
BrokerProxy getBroker(Properties) Returns the first BrokerProxy object that matches the filter specified by the Properties argument.
BrokerProxy getBrokerByName(String) Returns the BrokerProxy object with the supplied name, or null if a broker of that name does not exist or if the supplied argument was null.
Enumeration getBrokers(Properties) Returns an enumeration of all the BrokerProxy objects that match the filter specified by the Properties argument.
CollectiveProxy getCollective(Properties) Returns the first CollectiveProxy object that matches the filter specified by the Properties argument.
CollectiveProxy getCollectiveByName(String) Returns the CollectiveProxy object with the supplied name, or null if a collective of that name does not exist or if the supplied argument was null.
Enumeration getCollectives(Properties) Returns an enumeration of all the CollectiveProxy objects that match the filter specified by the Properties argument.
ConfigurationObjectType getConfigurationObjectType() Returns the ConfigurationObjectType associated with this AdministeredObject type.
ConfigurationObjectType getConfigurationObjectTypeOfParent() Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type.
Enumeration getConnections() Returns an enumeration of all TopologyProxy.Connection objects.
Enumeration getConnections(String) Returns an enumeration of TopologyProxy.Connection objects that affect the broker with the supplied UUID
int getNumberOfConnections() Returns the number of Connection objects in the topology.
int getNumberOfConnections(String) Returns the number of Connection objects in the topology, or that involve the broker with the supplied UUID.
void removeAccessControlEntries(AccessControlEntry[]) Deletes this list from the list of access control entries that applies to this object.
void removeDeletedBroker(String) Asks the Configuration Manager to remove all references to the broker with the supplied name or UUID from the Configuration Manager repository.
void setAccessControlEntries(AccessControlEntry[]) Sets the complete list of access control entries that apply to this object.
String toString() Displays the name of the object

Methods

addAccessControlEntries

public void addAccessControlEntries(AccessControlEntry[] accessControlList) throws ConfigManagerProxyLoggedException

Adds this list to the list of access control entries that applies to this object. Null elements in the array are ignored.

This operation is completely transactional. If the Configuration Manager successfully processes this request, all access control entries from the supplied array will be associated with this administered object. If not, the access control list for this object will have not been modified.

If the Configuration Manager to which the Configuration Manager Proxy is connected is of a version less than v6, this method will have no effect.

createBroker

public BrokerProxy createBroker(String name,
                                String qmgr) throws ConfigManagerProxyLoggedException

Asks the Configuration Manager to add a broker with the supplied name and queue manager to the Topology workspace. It is assumed that the Broker has already been created using e.g. mqsicreatebroker.

Note that a default execution group is NOT created. After using this method, callers must then create a default execution group. For example: broker.createExecutionGroup("default");

createCollective

public CollectiveProxy createCollective(String name) throws ConfigManagerProxyLoggedException

Asks the Configuration Manager to create a collective with the supplied name.

If a collective already exists with the supplied name, the existing collective is returned.

createConnectionByName

public void createConnectionByName(String sourceName,
                                   String targetName) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException

Asks the Configuration Manager to create a logical connection between two brokers.

If this method is called as part of a batch of requests in which either or both of the brokers are to be renamed, the operation will fail with a ConfigManagerProxyLoggedException. Callers wishing to avoid this situation should either not use batch mode, or use createConnectionByUUID() instead.

createConnectionByUUID

public void createConnectionByUUID(String sourceUUID,
                                   String targetUUID) throws ConfigManagerProxyLoggedException

Asks the Configuration Manager to create a logical connection between two brokers by UUID.

deleteBroker

public void deleteBroker(String name) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException

Asks the Configuration Manager to remove the broker with the supplied name from the Topology workspace.

This method will, in the following order:

  1. Remove the broker from any collectives of which it is a member.
  2. Delete any connections for which the broker is the source or target.
  3. Delete any execution groups of the broker.
  4. Remove the broker from the Configuration Manager hierarchy and publish/subscribe topology.
  5. If connected to a Configuration Manager of at least version 6, a deployment operation is automatically initiated that asks the broker concerned to tidy up any resources it controls.
After a successful return from this method, you must complete the following actions in order:
  1. Call TopologyProxy.deploy() EITHER if the deleted broker was connected to other brokers in the publish/subscribe topology, OR if you are connected to a version 5 Configuration Manager.
  2. When deployment has successfully completed, delete the broker component using mqsideletebroker. You must even do this if the broker is to be recreated.

Consider using removeDeletedBroker() if the broker component has already been deleted.

deleteBroker

public DeployResult deleteBroker(String name,
                                 long timeToWaitMs) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException

Asks the Configuration Manager to remove the broker with the supplied name from the Topology workspace.

This method will, in the following order:

  1. Remove the broker from any collectives of which it is a member.
  2. Delete any connections for which the broker is the source or target.
  3. Delete any execution groups of the broker.
  4. Remove the broker from the Configuration Manager hierarchy and publish/subscribe topology.
  5. If connected to a Configuration Manager of at least version 6, a deployment operation is automatically initiated that asks the broker concerned to tidy up any resources it controls, unless AttributeConstants.DEPLOYRESULT_NO_DEPLOYMENT is supplied as the value for timeToWaitMs.
After a successful return from this method, you must complete the following actions in order:
  1. Call TopologyProxy.deploy() EITHER if the deleted broker was connected to other brokers in the publish/subscribe topology, OR if you are connected to a version 5 Configuration Manager.
  2. When deployment has successfully completed, delete the broker component using mqsideletebroker. You must even do this if the broker is to be recreated.

Consider using removeDeletedBroker() if the broker component has already been deleted.

deleteCollective

public void deleteCollective(String name) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException

Asks the Configuration Manager to remove the collective with the supplied name from the Topology workspace.

deleteConnectionByName

public void deleteConnectionByName(String sourceName,
                                   String targetName) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException

Asks the Configuration Manager to remove a logical connection between two brokers.

If this method is called as part of a batch of requests in which either or both of the brokers are to be renamed, the operation will fail with a ConfigManagerProxyLoggedException. Callers wishing to avoid this situation should either not use batch mode, or use deleteConnectionByUUID() instead.

deleteConnectionByUUID

public void deleteConnectionByUUID(String sourceUUID,
                                   String targetUUID) throws ConfigManagerProxyLoggedException

Asks the Configuration Manager to remove a logical connection between two brokers.

deploy

public void deploy() throws ConfigManagerProxyLoggedException

Deploys any changes made to the pub/sub topology since the last pub/sub topology deploy to the affected brokers. The method returns as soon as the deploy request is enqueued for sending to the Configuration Manager.

deploy

public void deploy(boolean isDelta) throws ConfigManagerProxyLoggedException

Deploys the pub/sub topology configuration to brokers.

deploy

public DeployResult deploy(boolean isDelta,
                           long timeToWaitMs) throws ConfigManagerProxyLoggedException

Deploys the pub/sub topology configuration to brokers.

getAccessControlEntries

public AccessControlEntry[] getAccessControlEntries() 

Creates and returns a set of AccessControlEntry objects that describes the set of (principal,permission) tuples that have been applied specifically to this object.

This method does not return details of permissions that have been implicitly granted by inherited access control entries.

getBroker

public BrokerProxy getBroker(Properties props) throws ConfigManagerProxyPropertyNotInitializedException

Returns the first BrokerProxy object that matches the filter specified by the Properties argument.

getBrokerByName

public BrokerProxy getBrokerByName(String brokerName) throws ConfigManagerProxyPropertyNotInitializedException

Returns the BrokerProxy object with the supplied name, or null if a broker of that name does not exist or if the supplied argument was null.

getBrokers

public Enumeration getBrokers(Properties props) throws ConfigManagerProxyPropertyNotInitializedException

Returns an enumeration of all the BrokerProxy objects that match the filter specified by the Properties argument.

getCollective

public CollectiveProxy getCollective(Properties props) throws ConfigManagerProxyPropertyNotInitializedException

Returns the first CollectiveProxy object that matches the filter specified by the Properties argument. If multiple matches are found, an arbitrary match is returned. If no matches are found, null is returned.

getCollectiveByName

public CollectiveProxy getCollectiveByName(String collectiveName) throws ConfigManagerProxyPropertyNotInitializedException

Returns the CollectiveProxy object with the supplied name, or null if a collective of that name does not exist or if the supplied argument was null.

getCollectives

public Enumeration getCollectives(Properties props) throws ConfigManagerProxyPropertyNotInitializedException

Returns an enumeration of all the CollectiveProxy objects that match the filter specified by the Properties argument.

getConfigurationObjectType

public ConfigurationObjectType getConfigurationObjectType() 

Returns the ConfigurationObjectType associated with this AdministeredObject type.

getConfigurationObjectTypeOfParent

public ConfigurationObjectType getConfigurationObjectTypeOfParent() 

Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type.

getConnections

public Enumeration getConnections() throws ConfigManagerProxyPropertyNotInitializedException

Returns an enumeration of all TopologyProxy.Connection objects.

getConnections

public Enumeration getConnections(String brokerUUID) throws ConfigManagerProxyPropertyNotInitializedException

Returns an enumeration of TopologyProxy.Connection objects that affect the broker with the supplied UUID

getNumberOfConnections

public int getNumberOfConnections() throws ConfigManagerProxyPropertyNotInitializedException

Returns the number of Connection objects in the topology.

getNumberOfConnections

public int getNumberOfConnections(String brokerUUID) throws ConfigManagerProxyPropertyNotInitializedException

Returns the number of Connection objects in the topology, or that involve the broker with the supplied UUID.

removeAccessControlEntries

public void removeAccessControlEntries(AccessControlEntry[] accessControlList) throws ConfigManagerProxyLoggedException

Deletes this list from the list of access control entries that applies to this object. Null elements in the array are ignored. In addition, if any elements of the array are not associated with the administered object, they will be ignored.

This operation is completely transactional. If the Configuration Manager successfully processes this request, no access control entries from the supplied array will be associated with this administered object. If not, the access control list for this object will have not been modified.

If the Configuration Manager to which the Configuration Manager Proxy is connected is of a version less than v6, this method will have no effect.

removeDeletedBroker

public void removeDeletedBroker(String nameOrUUID) throws ConfigManagerProxyLoggedException

Asks the Configuration Manager to remove all references to the broker with the supplied name or UUID from the Configuration Manager repository. The broker may or may not have been previously removed from the domain using the deleteBroker() method.

It is not usually necessary to call this method.
The recommended procedure for removing a broker is:

  1. invoke TopologyProxy.deleteBroker(), then if this is successful
  2. run mqsideletebroker on the broker machine.
Following this approach allows the broker to tidy up cleanly any resources it controls.

The removeDeletedBroker() method only exists to clean any references to the broker from the Configuration Manager repository if the broker component has been prematurely deleted. Invoking this method against a running broker will make it unmanageable from the Configuration Manager and all Configuration Manager Proxy applications, including the toolkit. If you have a BrokerProxy reference to the broker, you must discard it after calling this method.

If the connected Configuration Manager is of a version earlier than v6, this method will have the same effect as calling the standard deleteBroker(). If the broker component has already been deleted on a domain controlled by one of these Configuration Managers, you must delete the broker's SYSTEM.BROKER.ADMIN.QUEUE and then redeploy the topology in order for the reference to be tidied from the repository.

setAccessControlEntries

public void setAccessControlEntries(AccessControlEntry[] accessControlList) throws ConfigManagerProxyLoggedException

Sets the complete list of access control entries that apply to this object. Null elements in the array are ignored. If the array itself is null or empty, all access control entries for this object are removed.

This method submits only changed access control entries to the Configuration Manager. It converts the supplied array into a set of access control entries to add and a set of access control entries to remove, based on the information currently supplied from the Configuration Manager. The add and remove operations are processed separately by the Configuration Manager as two atomic, transactional requests.

If the Configuration Manager to which the Configuration Manager Proxy is connected is of a version less than v6, this method will have no effect.

toString

public String toString() 

Displays the name of the object

Class Hierarchy All Classes All Fields and Methods