|
WBI BrokersTM Config Manager Proxy API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.broker.config.proxy.AdministeredObject
com.ibm.broker.config.proxy.TopologyProxy
There is exactly one Topology associated with each Config 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
Nested Class Summary | |
---|---|
static class |
TopologyProxy.Connection
A small data structure representing a connection between two brokers in the topology. |
Method Summary | |
---|---|
BrokerProxy |
createBroker(String name,
String qmgr)
Asks the Config Manager to add a broker with the supplied name and queue manager to the Topology workspace. |
CollectiveProxy |
createCollective(String name)
Asks the Config Manager to create a collective with the supplied name. |
void |
createConnectionByName(String sourceName,
String targetName)
Asks the Config Manager to create a logical connection between two brokers. |
void |
createConnectionByUUID(String sourceUUID,
String targetUUID)
Asks the Config Manager to create a logical connection between two brokers by UUID. |
void |
deleteBroker(String name)
Asks the Config Manager to remove the broker with the supplied name from the Topology workspace. |
void |
deleteCollective(String name)
Asks the Config Manager to remove the collective with the supplied name from the Topology workspace. |
void |
deleteConnectionByName(String sourceName,
String targetName)
Asks the Config Manager to remove a logical connection between two brokers. |
void |
deleteConnectionByUUID(String sourceUUID,
String targetUUID)
Asks the Config 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 isDelta)
Deploys the pub/sub topology configuration to brokers. |
DeployResult |
deploy(boolean isDelta,
long timeToWaitMs)
Deploys the pub/sub topology configuration to brokers. |
BrokerProxy |
getBroker(Properties props)
Returns the first BrokerProxy object that matches the filter specified by the Properties argument. |
BrokerProxy |
getBrokerByName(String brokerName)
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 props)
Returns an enumeration of all the BrokerProxy objects that match the filter specified by the Properties argument. |
CollectiveProxy |
getCollective(Properties props)
Returns the first CollectiveProxy object that matches the filter specified by the Properties argument. |
CollectiveProxy |
getCollectiveByName(String collectiveName)
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 props)
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 brokerUUID)
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 brokerUUID)
Returns the number of Connection objects in the topology, or that involve the broker with the supplied UUID. |
String |
toString()
Displays the name of the object |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public BrokerProxy createBroker(String name, String qmgr) throws ConfigManagerProxyLoggedException
Asks the Config 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");
name
- Name of the new broker.qmgr
- Queue Manager associated with the new broker.
ConfigManagerProxyLoggedException
- - if the request to create
a broker could not be sent to the Config Manager.public void deleteBroker(String name) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException
Asks the Config Manager to remove the broker with the supplied name from the Topology workspace.
This method will, in the following order:
name
- Name of the broker to delete
ConfigManagerProxyPropertyNotInitializedException
- if
the broker with the supplied name could not be found because
the Configuration Manager has not supplied complete topology
information.
ConfigManagerProxyLoggedException
- if the request to
remove the broker could not be sent to the Config Manager.public void deploy() throws ConfigManagerProxyLoggedException
ConfigManagerProxyLoggedException
- if the request
could not be sent to the Config Manager.public void deploy(boolean isDelta) throws ConfigManagerProxyLoggedException
isDelta
- If true, only changes to the deployed
pub/sub topology made since the last pub/sub topology
deploy will be submitted to brokers.
Otherwise, the complete pub/sub topology will be
deployed to all brokers.
The method returns as soon as the deploy request is
enqueued for sending to the Configuration Manager.
ConfigManagerProxyLoggedException
- if the request
could not be sent to the Config Manager.public DeployResult deploy(boolean isDelta, long timeToWaitMs) throws ConfigManagerProxyLoggedException
isDelta
- If true, only changes to the deployed
pub/sub topology made since the last pub/sub topology
deploy will be submitted to brokers.
Otherwise, the complete pub/sub topology will be
deployed to all brokers.timeToWaitMs
- A positive value describes the
maximum length of time to wait for broker responses
(in milliseconds) before returning the DeployResult.
Alternatively:
ConfigManagerProxyLoggedException
- if the request
could not be sent to the Config Manager.public Enumeration getBrokers(Properties props) throws ConfigManagerProxyPropertyNotInitializedException
props
- Filter to select which broker proxies to return.
ConfigManagerProxyPropertyNotInitializedException
- if the list of available brokers could not be determined
because the Config Manager did not supply the topology
information to the Config Manager Proxy before a timeout occurred.public BrokerProxy getBroker(Properties props) throws ConfigManagerProxyPropertyNotInitializedException
Returns the first BrokerProxy object that matches the filter specified by the Properties argument.
props
- - Filter to select the broker proxy to return.
ConfigManagerProxyPropertyNotInitializedException
- if the list of available brokers could not be determined
because the Config Manager did not supply the topology
information to the Config Manager Proxy before a timeout occurred.public BrokerProxy getBrokerByName(String brokerName) throws ConfigManagerProxyPropertyNotInitializedException
brokerName
-
ConfigManagerProxyPropertyNotInitializedException
- if the list of available brokers could not be determined
because the Config Manager did not supply the topology
information to the Config Manager Proxy before a timeout occurred.public void createConnectionByName(String sourceName, String targetName) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException
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.
sourceName
- Name of the source brokertargetName
- Name of the target broker
ConfigManagerProxyLoggedException
- if the request to create a
connection could not be sent to the Config Manager, if either the source
broker or the target broker does not exist, or if either
parameter refers to a broker for which an uncommitted rename
exists.
ConfigManagerProxyPropertyNotInitializedException
- if
a communication problem means that details of the broker names
could not be supplied by the Configuration Manager.public void createConnectionByUUID(String sourceUUID, String targetUUID) throws ConfigManagerProxyLoggedException
sourceUUID
- UUID of the source brokertargetUUID
- UUID of the target broker
ConfigManagerProxyLoggedException
- if the request to create a
connection could not be sent to the Config Manager, or if either the
source broker or the target broker does not exist.public void deleteConnectionByName(String sourceName, String targetName) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException
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.
sourceName
- Name of the source brokertargetName
- Name of the target broker
ConfigManagerProxyLoggedException
- if the request to remove a
connection could not be sent to the Config Manager, or if either the
source broker or the target broker does not exist, or if either
parameter refers to a broker for which an uncommitted rename
exists.
ConfigManagerProxyPropertyNotInitializedException
- if
the Configuration Manager did not supply complete topology information,
which means that the broker names could not be resolved.public void deleteConnectionByUUID(String sourceUUID, String targetUUID) throws ConfigManagerProxyLoggedException
sourceUUID
- UUID of the source brokertargetUUID
- UUID of the target broker
ConfigManagerProxyLoggedException
- if the request to remove a
connection could not be sent to the Config Manager, or if either the
source broker or the target broker does not exist.public CollectiveProxy createCollective(String name) throws ConfigManagerProxyLoggedException
Asks the Config Manager to create a collective with the supplied name.
name
- of the new collective
ConfigManagerProxyLoggedException
- if the request to create a
collective could not be sent to the Config Manager.public void deleteCollective(String name) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException
Asks the Config Manager to remove the collective with the supplied name from the Topology workspace.
name
- Name of the collective to remove from the topology.
ConfigManagerProxyPropertyNotInitializedException
- if
the collective with the supplied name could not be found because
the Configuration Manager has not supplied complete topology
information.
ConfigManagerProxyLoggedException
- if a collective with
the supplied name does not exist, or if the request to delete the
collective could not be sent to the Config Manager.public Enumeration getCollectives(Properties props) throws ConfigManagerProxyPropertyNotInitializedException
props
- Filter to select which collective proxies to return.
ConfigManagerProxyPropertyNotInitializedException
- if the collectives information could not be determined because
the topology information has not yet been supplied.public CollectiveProxy getCollective(Properties props) throws ConfigManagerProxyPropertyNotInitializedException
props
- Filter to select the collective proxy to return.
ConfigManagerProxyPropertyNotInitializedException
- if the list of
available brokers could not be determined because the Config
Manager has not yet supplied the topology information.public CollectiveProxy getCollectiveByName(String collectiveName) throws ConfigManagerProxyPropertyNotInitializedException
collectiveName
-
ConfigManagerProxyPropertyNotInitializedException
- if the list of available collectives could not be determined
because the Config Manager did not supply the topology
information to the Config Manager Proxy before a timeout occurred.public Enumeration getConnections() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the list
could not be determined because the Config
Manager has not yet supplied the topology information.public int getNumberOfConnections(String brokerUUID) throws ConfigManagerProxyPropertyNotInitializedException
brokerUUID
- UUID of the broker to match, or null
to return the number of connection objects in the
topology.
ConfigManagerProxyPropertyNotInitializedException
- if the list of
could not be determined because the Config
Manager has not yet supplied the topology information.public int getNumberOfConnections() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the list
could not be determined because the Config
Manager has not yet supplied the topology information.public Enumeration getConnections(String brokerUUID) throws ConfigManagerProxyPropertyNotInitializedException
brokerUUID
- UUID of the broker whose connections
are to be returned. If this parameter is null or blank,
all known connections in the topology are returned.
ConfigManagerProxyPropertyNotInitializedException
- if the list
could not be determined because the Config
Manager has not yet supplied the topology information.public ConfigurationObjectType getConfigurationObjectType()
getConfigurationObjectType
in class AdministeredObject
public ConfigurationObjectType getConfigurationObjectTypeOfParent()
getConfigurationObjectTypeOfParent
in class AdministeredObject
public String toString()
toString
in class AdministeredObject
|
WBI BrokersTM Config Manager Proxy API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |