java.lang.Object com.ibm.broker.config.proxy.AdministeredObject com.ibm.broker.config.proxy.ConfigManagerProxy
public class ConfigManagerProxy
extends AdministeredObject
This class allows applications to connect to and manipulate Configuration Managers. All domain objects are accessible through this one.
In order to use ConfigManagerProxy 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);
com.ibm.broker.config.proxy.ConfigManagerProxy extends
com.ibm.broker.config.proxy.AdministeredObject
|
|
Responsibilities |
|
Internal Collaborators |
com.ibm.broker.config.proxy.TopologyProxy
com.ibm.broker.config.proxy.LogProxy com.ibm.broker.config.proxy.TopicRootProxy com.ibm.broker.config.proxy.ConfigManagerConnectionParameters com.ibm.broker.config.proxy.SubscriptionsProxy |
Change Activity: -------- ----------- ------------- ------------------------------------ Reason: Date: Originator: Comments: -------- ----------- ------------- ------------------------------------ f19590.1 2004-03-19 HDMPL v6 Release
Field | Description |
---|---|
MAX_WAIT_TIME | The maximum amount of time the Configuration Manager Proxy can be told to wait for Configuration Manager messages until a ConfigManagerProxyPropertyNotInitialisedException is thrown. |
Method | Description |
---|---|
void addAccessControlEntries(AccessControlEntry[]) | Adds this list to the list of access control entries that applies to this object. |
void beginUpdates() | Tells the ConfigManagerProxy to hold back from sending any subsequent state-changing requests to the Configuration Manager, so multiple requests can be later sent off in a single message (or "batch"). |
void cancelDeployment() | Tells the Configuration Manager to remove all of the deployment locks that are currently in place. |
DeployResult cancelDeployment(long) | Tells the Configuration Manager to remove all of the deployment locks that are currently in place. |
void clearUpdates() | Tells the ConfigManagerProxy to discard any state-changing requests received since the last call to beginUpdates(). |
void deregisterListeners() | Deregisters ALL external listeners associated with the current ConfigManagerProxy connection. |
void disableConfigManagerProxyTracing() | Stops Configuration Manager Proxy service tracing. |
void disconnect() | Deregisters all listeners registered to this ConfigManagerProxy instance and closes the link to the Config Manager. |
void enableConfigManagerProxyTracing(String) | Enables Configuration Manager Proxy service tracing, sending output to the file with the supplied name. |
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 getConfigManagerFullVersion() | Returns the full version string of the Configuration Manager to which this Configuration Manager Proxy instance is connected. |
String getConfigManagerOSArch() | Returns a string describing the architecture of the Configuration Manager machine to which this Configuration Manager Proxy is connected. |
String getConfigManagerOSName() | Returns a string describing the name of the operating system running on the Configuration Manager machine to which this Configuration Manager Proxy is connected. |
String getConfigManagerOSVersion() | Returns a string describing the version of the operation system on the Configuration Manager machine to which this Configuration Manager Proxy is connected. |
int getConfigManagerProxyVersion() | Returns the major version string for the Configuration Manager Proxy (the constant AttributeConstants.VERSION_6). |
int getConfigManagerVersion() | Returns the major version identifier of the Configuration Manager to which the Configuration Manager Proxy is connected. |
ConfigurationObjectType getConfigurationObjectType() | Returns the ConfigurationObjectType associated with this AdministeredObject type. |
ConfigurationObjectType getConfigurationObjectTypeOfParent() | Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type. |
ConfigManagerProxy getInstance(ConfigManagerConnectionParameters) | Asks the Configuration Manager Proxy to connect to a Configuration Manager with the supplied parameters. |
LogProxy getLog() | Asks the Configuration Manager to register for all log records associated with the current user, through a LogProxy instance. |
SubscriptionsProxy getSubscriptions(String, String, String, String, GregorianCalendar, GregorianCalendar) | Generates a SubscriptionsProxy that represents those subscriptions fulfilling the supplied criteria. |
TopicRootProxy getTopicRoot() | Returns the RootTopicProxy object associated with this Configuration Manager. |
TopologyProxy getTopology() | Returns the TopologyProxy object associated with this Configuration Manager. |
boolean isBatching() | Returns true if and only if the creation of a batch is currently in progress. |
boolean isIncompatible() | Returns true if and only if the Configuration Manager Proxy has received a message from the Configuration Manager which indicates that the Configuration Manager is unable to process requests from this Configuration Manager Proxy because the versions are not compatible. |
boolean isIncompatible(boolean) | Returns true if and only if the Configuration Manager Proxy has received a message from the Configuration Manager which indicates that the Configuration Manager is unable to process requests from this Configuration Manager Proxy because the versions are not compatible. |
void removeAccessControlEntries(AccessControlEntry[]) | Deletes this list from the list of access control entries that applies to this object. |
void sendUpdates() | Tells the ConfigManagerProxy to send to the Configuration Manager all requests received since the beginUpdates() call. |
void sendUpdates(int) | Tells the ConfigManagerProxy to send to the Configuration Manager all requests received since the beginUpdates() call. |
void setAccessControlEntries(AccessControlEntry[]) | Sets the complete list of access control entries that apply to this object. |
void setLogger(String) | If directed to gather Configuration Manager Proxy trace for IBM service, do not use this method - use enableTracing(String) and disableTracing() instead. |
void setLogger(String, String) | Initializes a Configuration Manager Proxy logger. |
void setRetryCharacteristics(int, int, int) | Sets the retry characteristics for the Configuration Manager Proxy. |
void setRetryCharacteristics(long) | Sets the retry characteristics for the Configuration Manager Proxy. |
void startDebugSystemTrace() | Asks the Configuration Manager to start debug system trace. |
void startSystemTrace() | Asks the Configuration Manager to start system trace. |
void stopSystemTrace() | Asks the Configuration Manager to stop system trace. |
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 static final long MAX_WAIT_TIMEThe maximum amount of time the Configuration Manager Proxy can be told to wait for Configuration Manager messages until a ConfigManagerProxyPropertyNotInitialisedException is thrown. The actual value used can be set using ConfigManagerProxy.setRetryCharacteristics(long).
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 beginUpdates() throws ConfigManagerProxyLoggedExceptionTells the ConfigManagerProxy to hold back from sending any subsequent state-changing requests to the Configuration Manager, so multiple requests can be later sent off in a single message (or "batch"). Requests for information (for instance, requests to discover an object's attributes) will not be batched. The scope of this method is for any requests using this ConfigManagerProxy connection to the Configuration Manager.
- Throws
ConfigManagerProxyLoggedException
- if a batch is already in progress.
- See Also
public void cancelDeployment() throws ConfigManagerProxyLoggedExceptionTells the Configuration Manager to remove all of the deployment locks that are currently in place. This method does not recall deployment messages that have already been sent to the broker, nor does it tell the broker to ignore any previous deployment requests. Therefore after cancelling deployment, it is essential that any unprocessed deployment messages are manually removed from the brokers' SYSTEM.BROKER.ADMIN.QUEUE queues. 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 multiple brokers are not responding and you are sure that the outstanding deployment messages will never be processed by the brokers to which they are addressed.
If a single broker is not responding and the Configuration Manager Proxy is connected to a Configuration Manager of at least version 6, consider BrokerProxy.cancelDeployment() instead.
- 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 all of the deployment locks that are currently in place. This method does not recall deployment messages that have already been sent to the broker, nor does it tell the broker to ignore any previous deployment requests. Therefore after cancelling deployment, it is essential that any unprocessed deployment messages are manually removed from the brokers' SYSTEM.BROKER.ADMIN.QUEUE queues. 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 multiple brokers are not responding and you are sure that the outstanding deployment messages will never be processed by the brokers to which they are addressed.
If a single broker is not responding and the Configuration Manager Proxy is connected to a Configuration Manager of at least version 6, consider BrokerProxy.cancelDeployment() instead.
- 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 brokers in the domain, 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 void clearUpdates()Tells the ConfigManagerProxy to discard any state-changing requests received since the last call to beginUpdates(). If a batch was not in progress, or if the current batch has already been submitted using sendUpdates(), this call does nothing.
- See Also
public void deregisterListeners()Deregisters ALL external listeners associated with the current ConfigManagerProxy connection.
Note: The same effect can be achieved by using ConfigManagerProxy.disconnect(). The difference is that this call doesn't close the link to the Configuration Manager- it is possible to use call this method and still make use of the APIs and the listener registration mechanism.
public static void disableConfigManagerProxyTracing()Stops Configuration Manager Proxy service tracing.
Not to be confused with stopSystemTrace(), which enables tracing of the Configuration Manager.
public void disconnect()Deregisters all listeners registered to this ConfigManagerProxy instance and closes the link to the Config Manager. This makes client APIs unusable. After calling this method, the only way to re-establish the link to the Config Manager is by reissuing the ConfigManagerProxy.getInstance() call.
public static void enableConfigManagerProxyTracing(String filename) throws ConfigManagerProxyLoggedExceptionEnables Configuration Manager Proxy service tracing, sending output to the file with the supplied name. Enabling service trace will cause the Configuration Manager Proxy to work more slowly than usual.
Not to be confused with startSystemTrace() and startDebugSystemTrace(), which enables tracing of the Configuration Manager.
- Parameters
- filename - File spec of the output file, which cannot be null.
- Throws
ConfigManagerProxyLoggedException
if the logger could not be instantiated.
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 getConfigManagerFullVersion() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the full version string of the Configuration Manager to which this Configuration Manager Proxy instance is connected. The format of the string is not guaranteed.
If the Configuration Manager Proxy is connected to a Configuration Manager of less than v6 level, this method returns null.
- Returns
- String full version
- Throws
ConfigManagerProxyNotInitializedException
if the version information was not supplied by the Configuration Manager before a timeout occurred.
public String getConfigManagerOSArch() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns a string describing the architecture of the Configuration Manager machine to which this Configuration Manager Proxy is connected. The returned value is the value of the 'os.arch' system property in the Configuration Manager.
If the Configuration Manager Proxy is connected to a Configuration Manager of less than v6 level, this method returns null.
- Returns
- String system property
- Throws
ConfigManagerProxyNotInitializedException
if the required information was not supplied by the Configuration Manager before a timeout occurred.
public String getConfigManagerOSName() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns a string describing the name of the operating system running on the Configuration Manager machine to which this Configuration Manager Proxy is connected. The returned value is the value of the 'os.name' system property in the Configuration Manager.
If the Configuration Manager Proxy is connected to a Configuration Manager of less than v6 level, this method returns null.
- Returns
- String system property
- Throws
ConfigManagerProxyNotInitializedException
if the required information was not supplied by the Configuration Manager before a timeout occurred.
public String getConfigManagerOSVersion() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns a string describing the version of the operation system on the Configuration Manager machine to which this Configuration Manager Proxy is connected. The returned value is the value of the 'os.version' system property in the Configuration Manager.
If the Configuration Manager Proxy is connected to a Configuration Manager of less than v6 level, this method returns null.
- Returns
- String system property
- Throws
ConfigManagerProxyNotInitializedException
if the required information was not supplied by the Configuration Manager before a timeout occurred.
public static int getConfigManagerProxyVersion()Returns the major version string for the Configuration Manager Proxy (the constant AttributeConstants.VERSION_6). Future versions of the Configuration Manager Proxy may return different values.
- Returns
- int
public int getConfigManagerVersion() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the major version identifier of the Configuration Manager to which the Configuration Manager Proxy is connected. The returned value will be one of the following:
- AttributeConstants.VERSION_2 if the Configuration Manager is at a level less than v5. Configuration Manager Proxy applications cannot view or manipulate domains controlled by these Configuration Managers.
- AttributeConstants.VERSION_5 if the Configuration Manager is at any v5 or v5.1 level. Some Configuration Manager Proxy function does not work on these Configuration Managers. (See the method documentation for any issues.)
- AttributeConstants.VERSION_6 if the Configuration Manager is at any v6 level. All Configuration Manager Proxy function is supported on these Configuration Managers.
- Future Configuration Managers may return other values to the ones described here.
- Returns
- int major version identifier
- Throws
ConfigManagerProxyPropertyNotInitializedException
if information on the Configuration Manager's version was not supplied 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 type. As the ConfigManagerProxy is the root of the hierarchy, this method returns null.
- Returns
- ConfigurationObjectType associated with the logical parent of this class.
- Overrides
public static ConfigManagerProxy getInstance(ConfigManagerConnectionParameters cmcp) throws ConfigManagerProxyLoggedExceptionAsks the Configuration Manager Proxy to connect to a Configuration Manager with the supplied parameters. The sole parameter to this method is a ConfigManagerConnectionParameters object, of which there are two implementors currently:
- MQConfigManagerConnectionParameters, which requires an IP Address, port and Queue Manager name in order to be constructed, and
- MQPropertyFileConfigManagerConnectionParameters, which uses the contents of a .configmgr file to provide the required connection parameters.
- Parameters
- cmcp - An object describing the connection parameters to the Configuration Manager. Cannot be null.
- Returns
- ConfigManagerProxy a object that represents the connection to a Configuration Manager.
- Throws
ConfigManagerProxyLoggedException
if a connection could not be established for whatever reason.
public LogProxy getLog() throws ConfigManagerProxyPropertyNotInitializedExceptionAsks the Configuration Manager to register for all log records associated with the current user, through a LogProxy instance.
- Returns
- LogProxy represents all log records associated with the current user.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if the Topology subcomponent could not be loaded because the Config Manager has not yet supplied the required information.
public SubscriptionsProxy getSubscriptions(String topic, String brokers, String users, String subscriptionsPoints, GregorianCalendar startDate, GregorianCalendar endDate) throws ConfigManagerProxyLoggedExceptionGenerates a SubscriptionsProxy that represents those subscriptions fulfilling the supplied criteria.
- Parameters
- topic - Name of the topic to search, or null to search all topic names. '%' can be used within the string to denote a wildcard.
- brokers - Which brokers to search, or null to search all brokers. '%' can be used within the string to denote a wildcard.
- users - Which users to search, or null to search all users. '%' can be used within the string to denote a wildcard.
- subscriptionsPoints - Which subscriptions points to search, or null to search all subscriptions points. '%' can be used within the string to denote a wildcard.
- startDate - The earliest date to search, or null to not specify a start date.
- endDate - The latest date to search, or null to not specify an end date.
- Returns
- SubscriptionsProxy Object that describes the query. The object will be asynchronously populated with the matching results.
- Throws
ConfigManagerProxyLoggedException
if the request could not be sent to the Configuration Manager.
public TopicRootProxy getTopicRoot() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the RootTopicProxy object associated with this Configuration Manager.
- Returns
- RootTopicProxy - a reference to the root topic object associated with the Configuration Manager. Returns null if there is no root topic associated with this Configuration Manager.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if the Topology subcomponent could not be loaded because the Config Manager has not yet supplied the required information.
public TopologyProxy getTopology() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the TopologyProxy object associated with this Configuration Manager.
- Returns
- TopologyProxy - a reference to the topology object associated with the Configuration Manager, or null if there is no topology information available in the Configuration Manager.
- Throws
ConfigManagerProxyPropertyNotInitializedException
if the Topology subcomponent could not be loaded because the Config Manager has not yet supplied the required information.
public boolean isBatching()Returns true if and only if the creation of a batch is currently in progress.
- Returns
- boolean status of batch mode
- See Also
public boolean isIncompatible()Returns true if and only if the Configuration Manager Proxy has received a message from the Configuration Manager which indicates that the Configuration Manager is unable to process requests from this Configuration Manager Proxy because the versions are not compatible. If the ConfigManagerProxy object has not yet received any update from the Configuration Manager, the call will block until the first response (e.g. 'Proxy is incompatible' message) is received (or the timeout configured in ConfigManagerProxy.setRetryCharacteristics() occurs).
Note that the timeout condition will result in the response of false being returned, correctly indicating that no 'object-restricted' response has been received. Callers wishing to programmatically detect the timeout condition should use hasBeenUpdatedByConfigManager(true).
- Returns
- boolean true if and only if the Configuration Manager is unable to successfully communicate with this Proxy.
public boolean isIncompatible(boolean waitIfNotUpdated)Returns true if and only if the Configuration Manager Proxy has received a message from the Configuration Manager which indicates that the Configuration Manager is unable to process requests from this Configuration Manager Proxy because the versions are not compatible.
- Parameters
- waitIfNotUpdated - If this is set to true and the administered object has not yet received an update from the Configuration Manager, the call will block until the first response (e.g. the 'Proxy is incompatible' message) is received (or the timeout configured in ConfigManagerProxy.setRetryCharacteristics() occurs). This parameter allows the caller to ensure correctness of the returned value (if the value of the incompatible flag is sought before the first response from the Config Manager has necessarily been returned, the method may confusingly return 'false' even though the Config Manager is not compatible).
- Returns
- boolean true if and only if the Configuration Manager is unable to successfully communicate with this Proxy because of a version incompatibility.
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 sendUpdates() throws ConfigManagerProxyLoggedExceptionTells the ConfigManagerProxy to send to the Configuration Manager all requests received since the beginUpdates() call. After this method completes, subsequent requests will not be batched unless another beginUpdates() is called.
- Throws
ConfigManagerProxyLoggedException
If a batch was not in progress, if the batch contained no requests, or if the request could not be sent to the Configuration Manager.
- See Also
public void sendUpdates(int correlationID) throws ConfigManagerProxyLoggedExceptionTells the ConfigManagerProxy to send to the Configuration Manager all requests received since the beginUpdates() call. After this method completes, subsequent requests will not be batched unless another beginUpdates() is called.
- Parameters
- correlationID - Identifier that will accompany any actionresponse messages sent back to the caller through the AdministeredObjectListener interface.
- Throws
ConfigManagerProxyLoggedException
if a batch was not in progress, if the batch contained no requests or if the request could not be sent to the Configuration Manager.
- See Also
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 static void setLogger(String className) throws ConfigManagerProxyLoggedExceptionIf directed to gather Configuration Manager Proxy trace for IBM service, do not use this method - use enableTracing(String) and disableTracing() instead. Use startDebugSystemTrace(), startSystemTrace() and stopSystemTrace() to control Configuration Manager tracing. Use MessageFlowProxy.setUserTrace() to control tracing of message flows.
This method sets up an logger that does not require parameters.
- Parameters
- className - Fully qualified name of the logger class (must extend com.ibm.broker.config.proxy.Logger). A null or blank value here will disable logging.
- Throws
ConfigManagerProxyLoggedException
if the logger could not be instantiated.
public static void setLogger(String className, String params) throws ConfigManagerProxyLoggedExceptionInitializes a Configuration Manager Proxy logger. If directed to gather Configuration Manager Proxy trace for IBM service, do not use this method - use enableConfigManagerProxyTracing(String) and disableConfigManagerProxyTracing() instead. Use startDebugSystemTrace(), startSystemTrace() and stopSystemTrace() to control Configuration Manager tracing. Use MessageFlowProxy.setUserTrace() to control tracing of message flows.
- Parameters
- className - Fully qualified name of the logger class (must extend com.ibm.broker.config.proxy.Logger) A null or blank value here will disable logging.
- params - any parameters required by the logger
- Throws
ConfigManagerProxyLoggedException
if the logger could not be instantiated.
public static void setRetryCharacteristics(int maxRetries, int baseRetryWaitTime, int retryWaitTimeIncrement)Sets the retry characteristics for the Configuration Manager Proxy. These settings are used for all ConfigManagerProxy connections in the JVM.
The Configuration Manager Proxy may not always have been supplied a required piece of information that is needed to perform an operation (e.g. it can't return a broker's execution group list if that broker's information has not been supplied to it by the Configuration Manager). This can happen if the proxy has a slow link to the Configuration Manager, or if the Configuration Manager is heavily burdened or just not running.
Collectively, the parameters supplied to this method represent the maximum amount of time to wait for the required information to arrive before the exception is thrown. Specifically, three parameters are required which describe how many times the Configuration Manager Proxy should poll incoming messages from the Configuration Manager to see if the required information has arrived. The three parameters are: the number of times to retry, the initial amount of time to wait between failure (in milliseconds) and the amount of time to increase the wait time by on successive failure (again in milliseconds).
So supplying (10,1000,1000) to this method (which happens to be the default) means that retries will occur one, two, four, seven, eleven seconds after the first failure (and so on). If the required information still cannot be found after the number of maxRetries is exhausted, a ConfigManagerProxyPropertyNotInitializedException will be thrown to the calling application.
- Parameters
- maxRetries - the maximum number of consecutive failures before an exception is thrown to the calling application.
- baseRetryWaitTime - The initial time to wait between retries (in milliseconds)
- retryWaitTimeIncrement - How much to increase the retry wait time by after each consecutive failure.
public static void setRetryCharacteristics(long maxWaitTimeMs)Sets the retry characteristics for the Configuration Manager Proxy. These settings are used for all ConfigManagerProxy connections in the JVM.
The Configuration Manager Proxy may not always have been supplied a required piece of information that is needed to perform an operation (e.g. it can't return a broker's execution group list if that broker's information has not been supplied to it by the Configuration Manager). This can happen if the proxy has a slow link to the Configuration Manager, or if the Configuration Manager is heavily burdened or just not running.
- Parameters
- maxWaitTimeMs - the maximum length of time the Configuration Manager Proxy can wait for a response from the Configuration Manager before a ConfigManagerProxyPropertyNotInitalizedException is thrown. The maximum value allowed value is ConfigManagerProxy.MAX_WAIT_TIME If the supplied value is greater than this, ConfigManagerProxy.MAX_WAIT_TIME will be used instead.
public void startDebugSystemTrace() throws ConfigManagerProxyLoggedExceptionAsks the Configuration Manager to start debug system trace.
- Throws
ConfigManagerProxyLoggedException
if the request to start system trace could not be sent to the Configuration Manager.
public void startSystemTrace() throws ConfigManagerProxyLoggedExceptionAsks the Configuration Manager to start system trace. Not to be confused with enableTracing(), which enables tracing of the Configuration Manager Proxy application.
- Throws
ConfigManagerProxyLoggedException
if the request to start system trace could not be sent to the Configuration Manager.
public void stopSystemTrace() throws ConfigManagerProxyLoggedExceptionAsks the Configuration Manager to stop system trace. Not to be confused with disableTracing(), which enables tracing of the Configuration Manager Proxy application.
- Throws
ConfigManagerProxyLoggedException
if the request to stop system trace could not be sent to the Configuration Manager.
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.getExecutionGroup(ExecutionGroup.withUUID("1234")); will return the Execution Group with UUID "1234" that exists in broker1.
- Parameters
- uuid - property to set
- Returns
- Properties a new Properties object with the relevant key/value pairs set.