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 35108.6 2006-01-24 HDMPL Added support for 64-bit execution groups
Class | Description |
---|---|
BrokerProxy.MulticastParameterSet | A small data structure that represents the set of parameters required to enable multicast on this broker. |
Method | Description |
---|---|
void addAccessControlEntries(AccessControlEntry[]) | Adds this list to the list of access control entries that applies to this object. |
void cancelDeployment() | Tells the Configuration Manager to remove any deployment lock that may currently be in place for the current broker. |
DeployResult cancelDeployment(long) | Tells the Configuration Manager to remove any deployment lock that may currently be in place for the current broker. |
ExecutionGroupProxy createExecutionGroup(String) | Asks the Configuration Manager to add an Execution Group of the supplied name to the broker. |
ExecutionGroupProxy createExecutionGroup(String, int) | Asks the Configuration Manager to add an Execution Group of the supplied name and architecture to the broker. |
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. |
DeployResult deleteExecutionGroup(String, long) | 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. |
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. |
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. |
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 removeAccessControlEntries(AccessControlEntry[]) | Deletes this list from the list of access control entries that applies to this object. |
void setAccessControlEntries(AccessControlEntry[]) | Sets the complete list of access control entries that apply to this object. |
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 addAccessControlEntries(AccessControlEntry[] accessControlList) throws ConfigManagerProxyLoggedExceptionAdds 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.
- Parameters
- accessControlList - Array of access control entries which are to be added to this object.
- Throws
- Throws
ConfigManagerProxyLoggedException
if the request to update the object could not be sent to the Configuration Manager.
public void cancelDeployment() throws ConfigManagerProxyLoggedExceptionTells the Configuration Manager to remove any deployment lock that may currently be in place for the current broker. If there is no outstanding deployment for the current broker, the Configuration Manager will do nothing.
The Configuration Manager will attempt to recall any unprocessed deployment messages from the broker's SYSTEM.BROKER.ADMIN.QUEUE, but this can only succeed if the broker is on the same queue manager as the Configuration Manager. Usually, the Configuration Manager cannot recall deployment messages that have been sent to the broker, and so it is essential that, after cancelling deployment, any unprocessed deployment messages are manually removed from the broker's SYSTEM.BROKER.ADMIN.QUEUE queue. If this is not done, and a broker subsequently processes a deployment message that was cancelled, the Configuration Manager may become out of sync with the broker.
Only use this method if you are sure that any outstanding deployment message will never be processed by the broker to which it is addressed.
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 DeployResult cancelDeployment(long timeToWaitMs) throws ConfigManagerProxyLoggedExceptionTells the Configuration Manager to remove any deployment lock that may currently be in place for the current broker. If there is no outstanding deployment for the current broker, the Configuration Manager will do nothing.
The Configuration Manager will attempt to recall any unprocessed deployment messages from the broker's SYSTEM.BROKER.ADMIN.QUEUE, but this can only succeed if the broker is on the same queue manager as the Configuration Manager. Usually, the Configuration Manager cannot recall deployment messages that have been sent to the broker, and so it is essential that, after cancelling deployment, any unprocessed deployment messages are manually removed from the broker's SYSTEM.BROKER.ADMIN.QUEUE queue. If this is not done, and a broker subsequently processes a deployment message that was cancelled, the Configuration Manager may become out of sync with the broker.
Only use this method if you are sure that any outstanding deployment message will never be processed by the broker to which it is addressed.
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.
- Parameters
- timeToWaitMs - A positive value describes the maximum length of time to wait for a response from the Configuration Manager (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 indefinitely for the response from the Configuration Manager.
- 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. Note that the cancel deployment operation does not require any interaction with the broker to which it refers, and so the DeployResult object will not contain any broker-specific results (for example, getDeployedBrokers() will return an empty enumeration).
- 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 ExecutionGroupProxy.deploy() to do this.
If an execution group already exists with the supplied name, the existing execution group is returned.
- 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 ConfigManagerProxyLoggedExceptionAsks the Configuration Manager to add an Execution Group of the supplied name and architecture to the broker.
Upon processing this action, the Configuration Manager will not have deployed the execution group to the broker. Use ExecutionGroupProxy.deploy() to do this.
If an execution group already exists with the supplied name, the existing execution group is returned.
- Parameters
- name - Name of the new execution group.
- arch - Desired processor architecture of the new execution group. Valid values are AttributeConstants.EG_PROCESSOR_ARCHITECTURE_32BIT (to create a 32-bit execution group) and AttributeConstants.EG_PROCESSOR_ARCHITECTURE_64BIT (to create a 64-bit execution group).
If the target broker is of a version earlier than V6 FixPack 01, the execution group must be 32-bit. If the Configuration Manager to which this Configuration Manager Proxy is connected is of a version earlier than V6 FixPack 01, the the architecture property will be ignored and the execution group will be created as 32-bit.
- 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 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. The method returns as soon as the deletion request has been enqueued for sending to the Configuration Manager.
Once it has been processed by the Configuration Manager, if the request is successful any resources used by the execution group will be removed and the execution group will no longer appear in the output of mqsilist for that broker. If the execution group had never been successfully deployed to the broker, the execution group reference is simply removed from the Configuration Manager's repository.
If the execution group being deleted is being used as the broker's default execution group (denoted by defaultExecutionGroup 'true' on the execution group BIP2201 start message), note that the broker will not completely remove the execution group until the broker is restarted.
- 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 DeployResult deleteExecutionGroup(String name, long timeToWaitMs) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException
Asks the Configuration Manager to remove the execution group with the supplied name from the broker.
If the request is successful, any resources used by the execution group will be removed and the execution group will no longer appear in the output of mqsilist for that broker. If the execution group had never been successfully deployed to the broker, the execution group reference is simply removed from the Configuration Manager's repository.
If the execution group being deleted is being used as the broker's default execution group (denoted by defaultExecutionGroup 'true' on the execution group BIP2201 start message), note that the broker will not completely remove the execution group until the broker is restarted.
- Parameters
- name - of the execution group to be deleted.
- timeToWaitMs - A positive value describes the maximum length of time to wait for broker responses (in milliseconds) before returning the DeployResult, if applicable. 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_NO_DEPLOYMENT means that no deploy operation will be attempted after the reference has been removed from the repository. If this is the case, this method will return null and a BrokerProxy.deploy() must subsequently be invoked in order to cleanly tidy up the execution group's resources in the broker component.
- 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 indefinitely until a response has been received from the broker.
- 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 or AttributeConstants.DEPLOYRESULT_NO_DEPLOYMENT, in which case the DeployResult will be null (as usual).
- Returns
- DeployResult object that can be used to query the results of the deployment part of the operation (if applicable). The deployment will only affect the current 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 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.
- Returns
- AccessControlEntry[] array of AccessControlEntry objects that apply to this object.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if this objects list of Access Control Entries was not supplied by the Configuration Manager before a timeout occurred.
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. This method is an ExecutionGroupProxy-specific wrapper to AdministeredObject.getManagedSubcomponent(Properties). Consider using getExecutionGroupByName(String) to return a execution group by name.
- Parameters
- props - Filter to select the ExecutionGroupProxy to return. Each key is an attribute name of the required object and each value is the required value of the attribute. A null or empty Properties object will match all execution groups of this broker.
- 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.
- See Also
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 the ExecutionGroupProxy to return. Each key is an attribute name of the required object and each value is the required value of the attribute. A null or empty Properties object will match all execution groups of this broker.
- Returns
- Enumeration The ExecutionGroupProxy objects 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 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 removeAccessControlEntries(AccessControlEntry[] accessControlList) throws ConfigManagerProxyLoggedExceptionDeletes 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.
- Parameters
- accessControlList - Array of access control entries which are to be removed from this object.
- Throws
ConfigManagerProxyLoggedException
if the request to update the object could not be sent to the Configuration Manager.
public void setAccessControlEntries(AccessControlEntry[] accessControlList) throws ConfigManagerProxyLoggedExceptionSets 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.
- Parameters
- accessControlList - Array of access control entries which are to apply to this object.
- Throws
ConfigManagerProxyLoggedException
if the request to update the object could not be sent to the Configuration Manager.- Throws
ConfigManagerProxyPropertyNotInitializedException
if this objects current list of Access Control Entries 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:
- all BrokerProxy handles to the modified broker (including this one), and handles to its ExecutionGroupProxy subcomponents, immediately become invalid. After the request is completed by the Configuration Manager, Configuration Manager Proxy applications must ask the TopologyProxy object for a new handle to the BrokerProxy if they wish to subsequently manipulate the broker.
- 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.