Class Hierarchy All Classes All Fields and Methods

Class com.ibm.broker.config.proxy.BrokerProxy

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

public class BrokerProxy
extends AdministeredObject

Each broker within the Configuration Manager's domain can be represented by a BrokerProxy.

In order to use BrokerProxy 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();
     BrokerProxy b = t.getBrokerByName("BROKER1");
 

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

Responsibilities Acts as a container of Execution Groups. Provides the ability to deploy to all execution groups. Provides the ability to control the deployed message flows for all owned execution groups.
Internal Collaborators com.ibm.broker.config.proxy.ExecutionGroupProxy


 Change Activity:
 -------- ----------- -------------   ------------------------------------
 Reason:  Date:       Originator:     Comments:
 -------- ----------- -------------   ------------------------------------
 25103.7  2004-03-18  HDMPL           v6 Release

 

Inner Class Index
Class Description
BrokerProxy.MulticastParameterSet A small data structure that represents the set of parameters required to enable multicast on this broker.
Method Index
Method Description
void cancelDeployment() Tells the Configuration Manager to cancel any deployment actions to this broker that are currently in progress.
ExecutionGroupProxy createExecutionGroup(String) Asks the Configuration Manager to add an Execution Group of the supplied name to the broker.
ExecutionGroupProxy createExecutionGroup(String, int) This method has been reserved for future use.
void deleteAllExecutionGroupsAndDeploy() Deletes all execution groups existing in the broker and deploys this change to the broker.
DeployResult deleteAllExecutionGroupsAndDeploy(long) Deletes all execution groups existing in the broker and deploys this change to the broker.
void deleteExecutionGroup(String) Asks the Configuration Manager to remove the Execution Group with the supplied name from the Broker.
void deploy() Deploys the broker's configuration to the broker.
DeployResult deploy(long) Deploys the broker's configuration to the broker.
void forceSubscribe() Asks the Configuration Manager to (re)subscribe itself to the broker's status topics.
String getAuthenticationProtocols() Returns the name of the 'Authentication Protocols' attribute associated with this broker.
ConfigurationObjectType getConfigurationObjectType() Returns the ConfigurationObjectType associated with this AdministeredObject type.
ConfigurationObjectType getConfigurationObjectTypeOfParent() Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject.
ExecutionGroupProxy getExecutionGroup(Properties) Returns the first ExecutiongroupProxy object that matches the filter specified by the Properties argument.
ExecutionGroupProxy getExecutionGroupByName(String) Returns the ExecutionGroupProxy object with the supplied name, or null if an execution group of that name does not exist or if the supplied argument was null.
Enumeration getExecutionGroups(Properties) Returns an enumeration of all the ExecutionGroupProxy objects that match the filter specified by the Properties argument.
String getInterbrokerHost() Returns the interbroker host associated with this broker.
int getInterbrokerPort() Returns the interbroker port associated with this broker.
TopicProxy.QoP getISysQualityOfProtectionLevel() Returns the 'ISys' Quality of Protection level associated with this broker.
Enumeration getMessageSets() Returns an Enumeration of all the message set names deployed at the broker level.
BrokerProxy.MulticastParameterSet getMulticastParameters() Returns a data structure that contains all the active multicast properties.
String getQueueManagerName() Returns the name of the Queue Manager associated with this broker.
boolean getSSLConnectorEnabled() Returns true if and only if the SSL connector is enabled on the broker.
String getSSLKeyRingFileName() Returns the name of the SSL Key ring file associated with this broker.
String getSSLPasswordFileName() Returns the name of the SSL Password file associated with this broker.
TopicProxy.QoP getSysQualityOfProtectionLevel() Returns the 'Sys' Quality of Protection level associated with this broker.
TopicProxy.QoP getTemporaryTopicQualityOfProtectionLevel() Returns the Quality of Protection level associated with this broker's temporary topic.
boolean isRunning() Returns true if the broker is running.
void setAuthenticationProtocols(String) Sets the authentication parameter for the broker.
void setInterbrokerHost(String) Sets the interbroker host associated with this broker.
void setInterbrokerPort(int) Sets the interbroker port associated with this broker.
void setISysQualityOfProtectionLevel(TopicProxy.QoP) Sets the 'ISys' Quality of Protection level for this broker.
void setMulticastParameters(BrokerProxy.MulticastParameterSet) Modifies the set of Multicast parameters for this broker.
void setQueueManagerName(String) Sets the queue manager name of the broker.
void setSSLConnectorEnabled(boolean) Enables or disables the SSL connector on this broker.
void setSSLKeyRingFileName(String) Sets the SSL key ring file parameter for the broker.
void setSSLPasswordFileName(String) Sets the SSL password file parameter for the broker.
void setSysQualityOfProtectionLevel(TopicProxy.QoP) Sets the 'Sys' Quality of Protection level for this broker.
void setTemporaryTopicQualityOfProtectionLevel(TopicProxy.QoP) Sets the Quality of Protection level for this broker's temporary topic.
void setUserTrace(MessageFlowProxy.UserTrace) Configures the user trace settings for every execution group under the execution group's control.
void setUUID(String) Replaces all occurrences of the broker's UUID in the Configuration Manager repository with the supplied value.
void startMessageFlows() Asks the Configuration Manager to start all message flows deployed to the broker.
void stopMessageFlows(boolean) Asks the Configuration Manager to stop all message flows deployed to the broker.
Properties withName(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.
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.

Methods

cancelDeployment

public void cancelDeployment() throws ConfigManagerProxyLoggedException

Tells the Configuration Manager to cancel any deployment actions to this broker that are currently in progress. This should only be called if a previous deployment to the broker failed for some reason, and this is preventing a new deployment to the broker from taking place.

Cancelling deployment to a specific broker does not work if the Configuration Manager Proxy is connected to a v5 Configuration Manager. Use ConfigManagerProxy.cancelDeployment() if this is the case.

createExecutionGroup

public ExecutionGroupProxy createExecutionGroup(String name) throws ConfigManagerProxyLoggedException

Asks the Configuration Manager to add an Execution Group of the supplied name to the broker.

Upon processing this action, the Configuration Manager will not have deployed the execution group to the broker. Use either ExecutionGroupProxy.deploy() or BrokerProxy.deploy() to do this.

createExecutionGroup

public ExecutionGroupProxy createExecutionGroup(String name,
                                                int arch) throws ConfigManagerProxyLoggedException

This method has been reserved for future use. Use BrokerProxy.createExecutionGroup(String) instead.

deleteAllExecutionGroupsAndDeploy

public void deleteAllExecutionGroupsAndDeploy() throws ConfigManagerProxyLoggedException

Deletes all execution groups existing in the broker and deploys this change to the broker. This method should only be called as a last resort, for example if the broker is out of step with the Configuration Manager and the only alternative would be to delete the broker. Any active message flows on the broker will be deleted. The method returns as soon as the deploy request is enqueued for sending to the Configuration Manager.

deleteAllExecutionGroupsAndDeploy

public DeployResult deleteAllExecutionGroupsAndDeploy(long timeToWaitMs) throws ConfigManagerProxyLoggedException

Deletes all execution groups existing in the broker and deploys this change to the broker. This method should only be called as a last resort, for example if the broker is out of step with the Configuration Manager and the only alternative would be to delete the broker. Any active message flows on the broker will be deleted.

deleteExecutionGroup

public void deleteExecutionGroup(String name) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException

Asks the Configuration Manager to remove the Execution Group with the supplied name from the Broker.

A successful return from this method does not necessarily mean that the Group was successfully deleted! This is because the Configuration Manager will process the request asynchronously.

deploy

public void deploy() throws ConfigManagerProxyLoggedException

Deploys the broker's configuration to the broker. The list of valid execution groups is deployed, as well as any settings that can be configured using the Configuration Manager Proxy BrokerProxy class. The configuration deployed is the one that is known to the Configuration Manager at the time of deployment. The method returns as soon as the deploy request is enqueued for sending to the Configuration Manager.

deploy

public DeployResult deploy(long timeToWaitMs) throws ConfigManagerProxyLoggedException

Deploys the broker's configuration to the broker. The list of valid execution groups is deployed, as well as any settings that can be configured using the Configuration Manager Proxy BrokerProxy class. The configuration deployed is the one that is known to the Configuration Manager at the time of deployment.

forceSubscribe

public void forceSubscribe() throws ConfigManagerProxyLoggedException

Asks the Configuration Manager to (re)subscribe itself to the broker's status topics. The status topics tell the Configuration Manager when message flows and other resources start and stop. If the Configuration Manager is not subscribed to these topics, Configuration Manager Proxy applications may show incorrect run state.

It is not usually necessary to call this method. The Configuration Manager will automatically attempt to subscribe to the status topics as required.

This method will have no effect if the connected Configuration Manager is of a version earlier than v6.

getAuthenticationProtocols

public String getAuthenticationProtocols() throws ConfigManagerProxyPropertyNotInitializedException

Returns the name of the 'Authentication Protocols' attribute associated with this broker. If the property has not been defined for this broker, null is returned.

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.

getExecutionGroup

public ExecutionGroupProxy getExecutionGroup(Properties props) throws ConfigManagerProxyPropertyNotInitializedException

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

getExecutionGroupByName

public ExecutionGroupProxy getExecutionGroupByName(String executionGroupName) throws ConfigManagerProxyPropertyNotInitializedException

Returns the ExecutionGroupProxy object with the supplied name, or null if an execution group of that name does not exist or if the supplied argument was null.

getExecutionGroups

public Enumeration getExecutionGroups(Properties props) throws ConfigManagerProxyPropertyNotInitializedException

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

getInterbrokerHost

public String getInterbrokerHost() throws ConfigManagerProxyPropertyNotInitializedException

Returns the interbroker host associated with this broker.

getInterbrokerPort

public int getInterbrokerPort() throws ConfigManagerProxyPropertyNotInitializedException

Returns the interbroker port associated with this broker.

getISysQualityOfProtectionLevel

public TopicProxy.QoP getISysQualityOfProtectionLevel() throws ConfigManagerProxyPropertyNotInitializedException

Returns the 'ISys' Quality of Protection level associated with this broker. If the property has not been defined for this broker, unknown is returned.

getMessageSets

public Enumeration getMessageSets() throws ConfigManagerProxyPropertyNotInitializedException

Returns an Enumeration of all the message set names deployed at the broker level. Since WBI Brokers v5, all message sets have been deployed at the execution group level, which means that in most circumstances the returned Enumeration will be empty. To list all message sets deployed at the execution group level, use ExecutionGroupProxy.getMessageSets().

getMulticastParameters

public BrokerProxy.MulticastParameterSet getMulticastParameters() throws ConfigManagerProxyPropertyNotInitializedException

Returns a data structure that contains all the active multicast properties. If a valid set of multicast parameters has not been configured on this broker, null is returned.

getQueueManagerName

public String getQueueManagerName() throws ConfigManagerProxyPropertyNotInitializedException

Returns the name of the Queue Manager associated with this broker.

getSSLConnectorEnabled

public boolean getSSLConnectorEnabled() throws ConfigManagerProxyPropertyNotInitializedException

Returns true if and only if the SSL connector is enabled on the broker.

getSSLKeyRingFileName

public String getSSLKeyRingFileName() throws ConfigManagerProxyPropertyNotInitializedException

Returns the name of the SSL Key ring file associated with this broker. If the property has not been defined for this broker, null is returned.

getSSLPasswordFileName

public String getSSLPasswordFileName() throws ConfigManagerProxyPropertyNotInitializedException

Returns the name of the SSL Password file associated with this broker. If the property has not been defined for this broker, null is returned.

getSysQualityOfProtectionLevel

public TopicProxy.QoP getSysQualityOfProtectionLevel() throws ConfigManagerProxyPropertyNotInitializedException

Returns the 'Sys' Quality of Protection level associated with this broker. If the property has not been defined for this broker, unknown is returned.

getTemporaryTopicQualityOfProtectionLevel

public TopicProxy.QoP getTemporaryTopicQualityOfProtectionLevel() throws ConfigManagerProxyPropertyNotInitializedException

Returns the Quality of Protection level associated with this broker's temporary topic. If the property has not been defined for this broker, unknown is returned.

isRunning

public boolean isRunning() throws ConfigManagerProxyPropertyNotInitializedException

Returns true if the broker is running.

setAuthenticationProtocols

public void setAuthenticationProtocols(String authProtocols) throws ConfigManagerProxyLoggedException

Sets the authentication parameter for the broker. In order for the changes to take effect on the broker, the broker's configuration must be redeployed after this call has completed.

setInterbrokerHost

public void setInterbrokerHost(String ibHost) throws ConfigManagerProxyLoggedException

Sets the interbroker host associated with this broker.

setInterbrokerPort

public void setInterbrokerPort(int ibPort) throws ConfigManagerProxyLoggedException

Sets the interbroker port associated with this broker.

setISysQualityOfProtectionLevel

public void setISysQualityOfProtectionLevel(TopicProxy.QoP newQoP) throws ConfigManagerProxyLoggedException

Sets the 'ISys' Quality of Protection level for this broker.

setMulticastParameters

public void setMulticastParameters(BrokerProxy.MulticastParameterSet newParameterSet) throws ConfigManagerProxyLoggedException, IllegalArgumentException

Modifies the set of Multicast parameters for this broker. In order for the settings to take effect the settings need to be deployed.

setQueueManagerName

public void setQueueManagerName(String newQMgr) throws ConfigManagerProxyLoggedException

Sets the queue manager name of the broker.

setSSLConnectorEnabled

public void setSSLConnectorEnabled(boolean isEnabled) throws ConfigManagerProxyLoggedException

Enables or disables the SSL connector on this broker. In order for the changes to take effect on the broker, the broker's configuration must be redeployed after this call has completed. This feature cannot be enabled on v5.x brokers.

setSSLKeyRingFileName

public void setSSLKeyRingFileName(String keyRingFile) throws ConfigManagerProxyLoggedException

Sets the SSL key ring file parameter for the broker. In order for the changes to take effect on the broker, the broker's configuration must be redeployed after this call has completed.

setSSLPasswordFileName

public void setSSLPasswordFileName(String passwordFile) throws ConfigManagerProxyLoggedException

Sets the SSL password file parameter for the broker. In order for the changes to take effect on the broker, the broker's configuration must be redeployed after this call has completed.

setSysQualityOfProtectionLevel

public void setSysQualityOfProtectionLevel(TopicProxy.QoP newQoP) throws ConfigManagerProxyLoggedException

Sets the 'Sys' Quality of Protection level for this broker.

setTemporaryTopicQualityOfProtectionLevel

public void setTemporaryTopicQualityOfProtectionLevel(TopicProxy.QoP newQoP) throws ConfigManagerProxyLoggedException

Sets the Quality of Protection level for this broker's temporary topic.

setUserTrace

public void setUserTrace(MessageFlowProxy.UserTrace newTrace) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException

Configures the user trace settings for every execution group under the execution group's control.

setUUID

public void setUUID(String newUUID) throws ConfigManagerProxyLoggedException, IllegalArgumentException

Replaces all occurrences of the broker's UUID in the Configuration Manager repository with the supplied value.

This method can be used to attempt to take ownership of an existing broker after a failure of the Configuration Manager repository, possibly after receipt of the message BIP2045. In this case, the UUID parameter supplied to this method must equal the UUID parameter that the broker is expecting (included as an insert on the BIP2045 message). This will then allow subsequent deployment requests to succeed on the existing broker without having to recreate it.

This method is not usually required. It must only be called as a last resort.

A successful processing of the request by the Configuration Manager means that:

  1. the current BrokerProxy object can no longer be used to manipulate the broker; callers must ask the TopologyProxy object for a new handle to the BrokerProxy before continuing.
  2. any resources previously deployed to the broker will not be monitored by the Configuration Manager (unless they were already being monitored by that Configuration Manager). This means that the resources and their status cannot be administered by Configuration Manager Proxy applications. Removing all deployed resources and redeploying them to the broker is therefore recommended to allow them to be properly controlled.

As with most other methods in the Configuration Manager Proxy API, note that a successful processing of the request by the Configuration Manager is not the same as a clean return from this method. A successful completion will result in the following notifications:

If the Configuration Manager Proxy is connected to a Configuration Manager of version 5 or earlier, this method will have no effect.

startMessageFlows

public void startMessageFlows() throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException

Asks the Configuration Manager to start all message flows deployed to the broker.

Note: This method simply invokes the startMessageFlows() method for each ExecutionGroupProxy object logically owned by this BrokerProxy. As such, response notifications will be sent to AdministeredObjectListeners of the ExecutionGroupProxy objects and not the BrokerProxy.

stopMessageFlows

public void stopMessageFlows(boolean immediate) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException

Asks the Configuration Manager to stop all message flows deployed to the broker.

Note: This method simply invokes the stopMessageFlows() method for each ExecutionGroupProxy object logically owned by this BrokerProxy. As such, response notifications will be sent to AdministeredObjectListeners of the ExecutionGroupProxy objects and not the BrokerProxy.

withName

public static Properties withName(String name) 

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 get*() calls. For example, broker1.getExecutionGroup(ExecutionGroup.withName("eg1")); will return the Execution Group with Name "eg1" that exists in broker1.

withUUID

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 get*() methods. For example, broker1.getManagedSubcomponent(ExecutionGroup.withUUID("1234")); will return the Execution Group with UUID "1234" that exists in broker1.

Class Hierarchy All Classes All Fields and Methods