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
Class | Description |
---|---|
BrokerProxy.MulticastParameterSet | A small data structure that represents the set of parameters required to enable multicast on this broker. |
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. |
public void cancelDeployment() throws ConfigManagerProxyLoggedExceptionTells 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.
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
public ExecutionGroupProxy createExecutionGroup(String name) throws ConfigManagerProxyLoggedExceptionAsks 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.
- Parameters
- name - Name of the new execution group.
- Returns
- ExecutionGroupProxy an object that represents the new execution group.
- Throws
ConfigManagerProxyLoggedException
if the request to create the execution group could not be sent to the Configuration Manager.
public ExecutionGroupProxy createExecutionGroup(String name, int arch) throws ConfigManagerProxyLoggedExceptionThis method has been reserved for future use. Use BrokerProxy.createExecutionGroup(String) instead.
- Parameters
- name -
- arch -
- Returns
- ExecutionGroupProxy
- Throws
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.
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
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.
- Parameters
- timeToWaitMs - A positive value describes the maximum length of time to wait for broker responses (in milliseconds) before returning the DeployResult. Alternatively:
- A value of 0 causes the method to return immediately after the message has been successfully sent to the Configuration Manager.
- A value of AttributeConstants.DEPLOYRESULT_SUPPRESSION causes the method to return null immediately after the message has been successfully sent to the Configuration Manager. DeployResult objects are relatively expensive to create and maintain, and so supplying this constant should be used if the DeployResult is not parsed, or if performance of the Configuration Manager Proxy application is critical.
- A value of AttributeConstants.DEPLOYRESULT_WAIT_INDEFINITELY causes the method to wait until responses have been received from all brokers affected by the deploy.
- If batch mode is enabled the method returns immediately regardless of the value of this parameter. All completion codes in the returned DeployResult object will be 'pending' unless the value of timeToWaitMs is AttributeConstants.DEPLOYRESULT_SUPPRESSION, in which case the DeployResult will be null (as usual).
- Returns
- DeployResult object that can be used to query the results of the deployment.
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
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.
- Parameters
- name - of the Execution Group to be deleted from the Broker.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if the name could not be resolved because the broker information was not supplied by the Configuration Manager.- Throws
ConfigManagerProxyLoggedException
If the request to delete the Execution Group could not be sent to the Configuration Manager.
public void deploy() throws ConfigManagerProxyLoggedExceptionDeploys 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.
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
public DeployResult deploy(long timeToWaitMs) throws ConfigManagerProxyLoggedExceptionDeploys 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.
- Parameters
- timeToWaitMs - A positive value describes the maximum length of time to wait for broker responses (in milliseconds) before returning the DeployResult. Alternatively:
- A value of 0 causes the method to return immediately after the message has been successfully sent to the Configuration Manager.
- A value of AttributeConstants.DEPLOYRESULT_SUPPRESSION causes the method to return null immediately after the message has been successfully sent to the Configuration Manager. DeployResult objects are relatively expensive to create and maintain, and so supplying this constant should be used if the DeployResult is not parsed, or if performance of the Configuration Manager Proxy application is critical.
- A value of AttributeConstants.DEPLOYRESULT_WAIT_INDEFINITELY causes the method to wait until responses have been received from all brokers affected by the deploy.
- If batch mode is enabled the method returns immediately regardless of the value of this parameter. All completion codes in the returned DeployResult object will be 'pending' unless the value of timeToWaitMs is AttributeConstants.DEPLOYRESULT_SUPPRESSION, in which case the DeployResult will be null (as usual).
- Returns
- DeployResult object that can be used to query the results of the deployment.
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
public void forceSubscribe() throws ConfigManagerProxyLoggedExceptionAsks 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.
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
public String getAuthenticationProtocols() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the name of the 'Authentication Protocols' attribute associated with this broker. If the property has not been defined for this broker, null is returned.
- Returns
- String Name of the protocols.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's authentication protocols was not supplied by the Configuration Manager before a timeout occurred.
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.
- Returns
- ConfigurationObjectType associated with this class.
- Overrides
public ExecutionGroupProxy getExecutionGroup(Properties props) throws ConfigManagerProxyPropertyNotInitializedException
Returns the first ExecutiongroupProxy object that matches the filter specified by the Properties argument.
- Parameters
- props - Filter to select the executiongroup proxy to return.
- Returns
- ExecutionGroupProxy The first object that matched the supplied filter, or null if nothing matched the filter.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's execution groups was not supplied by the Configuration Manager before a timeout occurred.
public ExecutionGroupProxy getExecutionGroupByName(String executionGroupName) throws ConfigManagerProxyPropertyNotInitializedExceptionReturns 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.
- Parameters
- executionGroupName - Name of the execution group
- Returns
- ExecutionGroupProxy Configuration Manager Proxy representation of the requested execution group.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if the list of available execution groups could not be determined because the Configuration Manager did not supply the broker information to the Configuration Manager Proxy before a timeout occurred.
public Enumeration getExecutionGroups(Properties props) throws ConfigManagerProxyPropertyNotInitializedException
Returns an enumeration of all the ExecutionGroupProxy objects that match the filter specified by the Properties argument.
- Parameters
- props - - Filter to select which ExecutionGroups to return.
- Returns
- Enumeration - The Execution Group Proxies that matched the supplied filter.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's execution groups was not supplied by the Configuration Manager before a timeout occurred.
public String getInterbrokerHost() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the interbroker host associated with this broker.
- Returns
- String interbroker host property. If the property is not configured for this broker, null is returned.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's interbroker hostname was not supplied by the Configuration Manager before a timeout occurred.
public int getInterbrokerPort() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the interbroker port associated with this broker.
- Returns
- int interbroker port property. If the property is not configured for this broker, -1 is returned.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's interbroker port was not supplied by the Configuration Manager before a timeout occurred.
public TopicProxy.QoP getISysQualityOfProtectionLevel() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the 'ISys' Quality of Protection level associated with this broker. If the property has not been defined for this broker, unknown is returned.
- Returns
- TopicProxy.QoP Describes the quality of protection
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's ISys QoP level was not supplied by the Configuration Manager before a timeout occurred.
public Enumeration getMessageSets() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns 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().
- Returns
- Enumeration Containing message set names. If no message sets have been deployed at the broker level, the Enumeration will be empty.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's message sets was not supplied by the Configuration Manager before a timeout occurred.
public BrokerProxy.MulticastParameterSet getMulticastParameters() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns 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.
- Returns
- BrokerProxy.MulticastParameterSet Set of active multicast properties.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's multicast parameters was not supplied by the Configuration Manager before a timeout occurred.
public String getQueueManagerName() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the name of the Queue Manager associated with this broker.
- Returns
- String Name of the MQSeries Queue Manager.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's queue manager was not supplied by the Configuration Manager before a timeout occurred.
public boolean getSSLConnectorEnabled() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns true if and only if the SSL connector is enabled on the broker.
- Returns
- boolean whether the SSL connector is enabled
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's SSL connector state was not supplied by the Configuration Manager before a timeout occurred.
public String getSSLKeyRingFileName() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns 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.
- Returns
- String Name of the key ring file.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's keyring filename was not supplied by the Configuration Manager before a timeout occurred.
public String getSSLPasswordFileName() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the name of the SSL Password file associated with this broker. If the property has not been defined for this broker, null is returned.
- Returns
- String Name of the password file.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's SSL password filename was not supplied by the Configuration Manager before a timeout occurred.
public TopicProxy.QoP getSysQualityOfProtectionLevel() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the 'Sys' Quality of Protection level associated with this broker. If the property has not been defined for this broker, unknown is returned.
- Returns
- TopicProxy.QoP Describes the quality of protection
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's Sys QoP level was not supplied by the Configuration Manager before a timeout occurred.
public TopicProxy.QoP getTemporaryTopicQualityOfProtectionLevel() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns 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.
- Returns
- TopicProxy.QoP Describes the level of protection assigned to the topic.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's temporary topic QoP level was not supplied by the Configuration Manager before a timeout occurred.
public boolean isRunning() throws ConfigManagerProxyPropertyNotInitializedException
Returns true if the broker is running.
- Returns
- boolean - True if and only if broker.runstate equals "running".
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on this broker's run state was not supplied by the Configuration Manager before a timeout occurred.
public void setAuthenticationProtocols(String authProtocols) throws ConfigManagerProxyLoggedExceptionSets 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.
- Parameters
- authProtocols - - The authentication protocols string Must only contain a combination of characters 'P', 'M', 'R' or 'S'.
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.- Throws
ConfigManagerProxyLoggedException
if the supplied String was invalid.
public void setInterbrokerHost(String ibHost) throws ConfigManagerProxyLoggedExceptionSets the interbroker host associated with this broker.
- Parameters
- ibHost - - Interbroker host name associated with this broker.
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
public void setInterbrokerPort(int ibPort) throws ConfigManagerProxyLoggedExceptionSets the interbroker port associated with this broker.
- Parameters
- ibPort - - Interbroker port associated with this broker.
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
public void setISysQualityOfProtectionLevel(TopicProxy.QoP newQoP) throws ConfigManagerProxyLoggedExceptionSets the 'ISys' Quality of Protection level for this broker.
- Parameters
- newQoP - - The new Quality of Protection level (TopicProxy.QoP.none, TopicProxy.QoP.channelIntegrity, TopicProxy.QoP.messageIntegrity or TopicProxy.QoP.encrypted).
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager, or if the supplied argument was TopicProxy.QoP.unknown.
public void setMulticastParameters(BrokerProxy.MulticastParameterSet newParameterSet) throws ConfigManagerProxyLoggedException, IllegalArgumentExceptionModifies the set of Multicast parameters for this broker. In order for the settings to take effect the settings need to be deployed.
- Parameters
- newParameterSet - BrokerProxy.MulticastParameterSet object containing the new set of parameters for this broker.
- Throws
ConfigManagerProxyLoggedException
if the request to modify the parameters could not be sent to the Configuration Manager.- Throws
IllegalArgumentException
if any of the policed supplied parameters were found to be invalid.
public void setQueueManagerName(String newQMgr) throws ConfigManagerProxyLoggedExceptionSets the queue manager name of the broker.
- Parameters
- newQMgr - - The new queue manager name of the broker.
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
public void setSSLConnectorEnabled(boolean isEnabled) throws ConfigManagerProxyLoggedExceptionEnables 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.
- Parameters
- isEnabled - if and only if the value is true, SSL connector will be enabled at the next broker configuration deploy.
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
public void setSSLKeyRingFileName(String keyRingFile) throws ConfigManagerProxyLoggedExceptionSets 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.
- Parameters
- keyRingFile - - Path name of the key ring file (must point to a file accessible on the broker machine).
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
public void setSSLPasswordFileName(String passwordFile) throws ConfigManagerProxyLoggedExceptionSets 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.
- Parameters
- passwordFile - - Path name of the password file (must point to a file accessible on the broker machine).
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
public void setSysQualityOfProtectionLevel(TopicProxy.QoP newQoP) throws ConfigManagerProxyLoggedExceptionSets the 'Sys' Quality of Protection level for this broker.
- Parameters
- newQoP - The new Quality of Protection level (TopicProxy.QoP.none, TopicProxy.QoP.channelIntegrity, TopicProxy.QoP.messageIntegrity or TopicProxy.QoP.encrypted).
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager, or if the supplied argument was TopicProxy.QoP.unknown.
public void setTemporaryTopicQualityOfProtectionLevel(TopicProxy.QoP newQoP) throws ConfigManagerProxyLoggedExceptionSets the Quality of Protection level for this broker's temporary topic.
- Parameters
- newQoP - - The new Quality of Protection level (TopicProxy.QoP.none, TopicProxy.QoP.channelIntegrity, TopicProxy.QoP.messageIntegrity or TopicProxy.QoP.encrypted).
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager, or if the supplied argument was TopicProxy.QoP.unknown.
public void setUserTrace(MessageFlowProxy.UserTrace newTrace) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException
Configures the user trace settings for every execution group under the execution group's control.
- Parameters
- newTrace - One of:
- MessageFlowProxy.UserTrace.normal to enable normal user trace
- MessageFlowProxy.UserTrace.debug to enable debug user trace
- MessageFlowProxy.UserTrace.none to disable user trace
- Throws
ConfigManagerProxyPropertyNotInitializedException
if the list of message flows could not be determined for this execution group because the information was not supplied by the Configuration Manager.- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
public void setUUID(String newUUID) throws ConfigManagerProxyLoggedException, IllegalArgumentExceptionReplaces 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:
- 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.
- 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:
- a processModify() notification to listeners of the broker's ExecutionGroupProxy children, informing them that their database timestamp has been updated when their documents in the repository were refreshed to relink their parent to the new UUID.
- a processModify() notification to all TopologyProxy listeners, stating that a broker with the old UUID has been deleted, and that a broker with the same name but a different UUID has been added to the domain.
- a processDelete() notification to listeners of the (old) BrokerProxy.
If the Configuration Manager Proxy is connected to a Configuration Manager of version 5 or earlier, this method will have no effect.
- Parameters
- newUUID - String of the form "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" where each x is a hexadecimal digit. For example, "182684ce-0101-0000-0080-db2fb5787d78"). It is expected to be the same string as reported by insert '&2' of BIP2045.
- Throws
ConfigManagerProxyLoggedException
if the request to set the UUID could not be sent to the Configuration Manager.- Throws
IllegalArgumentException
if the new UUID was not in the correct format.
public void startMessageFlows() throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedExceptionAsks 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.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on the broker's execution groups was not supplied by the Configuration Manager.- Throws
ConfigManagerProxyLoggedException
if the request to start the message flows could not be sent to the Configuration Manager.
public void stopMessageFlows(boolean immediate) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedExceptionAsks 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.
- Parameters
- immediate - True if and only if the 'immediate' flag should be used.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on the broker's execution groups is not available.- Throws
ConfigManagerProxyLoggedException
if the request to stop the message flows could not be sent to the Configuration Manager.
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.
- 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 get*() methods. For example, broker1.getManagedSubcomponent(ExecutionGroup.withUUID("1234")); will return the Execution Group with UUID "1234" that exists in broker1.
- Returns
- java.util.Properties - a new Properties object with the relevant key/value pairs set.