public class ConfigManagerProxy extends AdministeredObject
As of WebSphere Message Broker V7, Configuration Managers are no longer used and applications should use the BrokerProxy class to connect directly with brokers. This class has been deprecated.
This class allows applications to connect to and manipulate brokers in a manner that is compatible with the Configuration Manager Proxy interface of previous versions. The recommended way of connecting to brokers is now through the BrokerProxy class, for example:
BrokerConnectionParameters bcp = new MQBrokerConnectionParameters("localhost", 1414, "QMGR"); BrokerProxy b = BrokerProxy.getInstance(bcp);Existing applications that use the ConfigManagerProxy.getInstance() method are able to connect, view and manipulate V7 brokers if they supply the connection properties of the broker rather than the Configuration Manager. When the ConfigManagerProxy class is used to connect to a broker in this way, the V7 broker will populate and return a dummy ConfigManagerProxy instance. Then, calling the ConfigManagerProxy.getTopology() method on this instance will cause the broker to populate and return a dummy Publish/Subscribe topology that contains a single reference to the connected broker. The returned TopologyProxy object can then be used to access the properties of the actual broker to which the application is connected.
Not all ConfigManagerProxy methods behave in an identical manner to the previous versions of the product. See the Javadoc for each method for more information.
Particularly, note that when connected through the ConfigManagerProxy root object, by default any attempts to modify the broker's configuration will be made synchronously, which means that the IBM Integration API (CMP) application will pause for up to 60s while the configuration change is made. This is to emulate the single-threaded nature of the old Configuration Manager. This behavior is configurable using BrokerProxy.setSynchronous().
Change Activity: -------- ----------- ------------- ------------------------------------ Reason: Date: Originator: Comments: -------- ----------- ------------- ------------------------------------ f19590.1 2004-03-19 HDMPL v6 release f44739.7 2007-07-30 HDMPL v6.1 release: Methods now return genericized types where relevant Added setAutoDiscoveryIntervalMins(int) Added getAutoDiscoveryIntervalMins() f51619.1 2008-07-14 HDMPL v7 release: Deprecated class
Modifier and Type | Field and Description |
---|---|
static long |
MAX_WAIT_TIME
Deprecated.
This constant is no longer used. It has been
replaced by the constant BrokerProxy.MAX_WAIT_TIME.
|
Modifier and Type | Method and Description |
---|---|
void |
addAccessControlEntries(AccessControlEntry[] accessControlList)
Deprecated.
This method is unique to Configuration Manager connections,
and as such is no longer used as of WebSphere Message Broker V7.
|
void |
beginUpdates()
Deprecated.
Tells the IBM Integration API (CMP) to hold back from sending
any subsequent state-changing requests to the broker,
so multiple requests can be later sent off in a single message
(or "batch").
|
void |
cancelDeployment()
Deprecated.
This method is not used as of WebSphere Message Broker V7.
Cancelling deployment is no longer required.
|
DeployResult |
cancelDeployment(long timeToWaitMs)
Deprecated.
This method is not used as of WebSphere Message Broker V7.
Cancelling deployment is no longer required.
|
void |
clearUpdates()
Deprecated.
Tells the IBM Integration API (CMP) to discard any
state-changing requests received since the last call to
beginUpdates().
|
void |
deregisterListeners()
Deprecated.
Deregisters ALL external listeners associated with the current connection.
|
static void |
disableConfigManagerProxyTracing()
Deprecated.
Use BrokerProxy.disableAdministrationAPITracing() instead.
|
void |
disconnect()
Deprecated.
Deregisters all listeners registered to this
ConfigManagerProxy instance and closes the link to the broker.
|
static void |
enableConfigManagerProxyTracing(java.lang.String filename)
Deprecated.
Use BrokerProxy.enableAdministrationAPITracing(String) instead.
|
AccessControlEntry[] |
getAccessControlEntries()
Deprecated.
This method is unique to Configuration Manager connections,
and as such is no longer used as of WebSphere Message Broker V7.
|
int |
getAutoDiscoveryIntervalMins()
Deprecated.
The Configuration Manager is no longer used.
The effects of invoking this method are no longer defined.
|
java.lang.String |
getConfigManagerFullVersion()
Deprecated.
The Configuration Manager is no longer used.
The effects of invoking this method are no longer defined.
|
java.lang.String |
getConfigManagerOSArch()
Deprecated.
The Configuration Manager is no longer used.
The effects of invoking this method are no longer defined.
|
java.lang.String |
getConfigManagerOSName()
Deprecated.
The Configuration Manager is no longer used.
The effects of invoking this method are no longer defined.
|
java.lang.String |
getConfigManagerOSVersion()
Deprecated.
The Configuration Manager is no longer used.
The effects of invoking this method are no longer defined.
|
static int |
getConfigManagerProxyVersion()
Deprecated.
Use BrokerProxy.getAdministrationAPIVersion() instead
|
int |
getConfigManagerVersion()
Deprecated.
The Configuration Manager is no longer used.
The effects of invoking this method are no longer defined.
|
ConfigurationObjectType |
getConfigurationObjectType()
Deprecated.
Returns the ConfigurationObjectType associated
with this AdministeredObject type.
|
ConfigurationObjectType |
getConfigurationObjectTypeOfParent()
Deprecated.
Returns the ConfigurationObjectType associated
with the logical parent of this AdministeredObject type.
|
static ConfigManagerProxy |
getInstance(ConfigManagerConnectionParameters cmcp)
Deprecated.
Use BrokerProxy.getInstance(BrokerConnectionParameters) instead.
|
LogProxy |
getLog()
Deprecated.
Use BrokerProxy.getLog() instead.
|
SubscriptionsProxy |
getSubscriptions(java.lang.String topic,
java.lang.String brokers,
java.lang.String users,
java.lang.String subscriptionsPoints,
java.util.GregorianCalendar startDate,
java.util.GregorianCalendar endDate)
Deprecated.
Subscriptions are no longer managed by WebSphere
Message Broker. The return value from this method will be an
dummy SubscriptionsProxy object with zero elements.
|
TopicRootProxy |
getTopicRoot()
Deprecated.
The concept of a topic hierarchy has been
removed. The return value from this method will be a dummy object
that describes an empty topic tree.
|
TopologyProxy |
getTopology()
Deprecated.
The concept of a publish/subscribe topology has been
removed. The return value from this method will be a dummy object
that describes a topology containing a single BrokerProxy object
(the broker to which the application is connected).
|
boolean |
isBatching()
Deprecated.
Returns true if and only if the creation of a
batch is currently in progress.
|
boolean |
isIncompatible()
Deprecated.
As of WebSphere Message Broker V7, the IBM
Integration API (CMP) is unable to communicate with
environments of V6.1 and earlier, so this method will always
return false.
|
boolean |
isIncompatible(boolean waitIfNotUpdated)
Deprecated.
As of WebSphere Message Broker V7, the IBM
Integration API (CMP) is unable to communicate with
environments of V6.1 and earlier, so this method will always
return false.
|
void |
removeAccessControlEntries(AccessControlEntry[] accessControlList)
Deprecated.
This method is unique to Configuration Manager connections,
and as such is no longer used as of WebSphere Message Broker V7.
|
void |
sendUpdates()
Deprecated.
Tells the IBM Integration API (CMP) to send to the broker all
requests received since the beginUpdates() call.
|
void |
sendUpdates(int correlationID)
Deprecated.
Tells the IBM Integration API (CMP) to send to the broker all
requests received since the beginUpdates() call.
|
void |
setAccessControlEntries(AccessControlEntry[] accessControlList)
Deprecated.
This method is unique to Configuration Manager connections,
and as such is no longer used as of WebSphere Message Broker V7.
|
void |
setAutoDiscoveryIntervalMins(int newIntervalMins)
Deprecated.
The Configuration Manager is no longer used.
The effects of invoking this method are no longer defined.
|
static void |
setLogger(java.lang.String className)
Deprecated.
Use BrokerProxy.enableAdministrationAPITracing(String) instead.
|
static void |
setLogger(java.lang.String className,
java.lang.String params)
Deprecated.
Use BrokerProxy.enableAdministrationAPITracing(String) instead.
|
static void |
setRetryCharacteristics(int maxRetries,
int baseRetryWaitTime,
int retryWaitTimeIncrement)
Deprecated.
Use BrokerProxy.setRetryCharacteristics(long) instead.
|
static void |
setRetryCharacteristics(long maxWaitTimeMs)
Deprecated.
Use BrokerProxy.setRetryCharacteristics(long) instead.
|
void |
startDebugSystemTrace()
Deprecated.
The Configuration Manager is no longer used.
The effects of invoking this method are no longer defined.
|
void |
startSystemTrace()
Deprecated.
The Configuration Manager is no longer used.
The effects of invoking this method are no longer defined.
|
void |
stopSystemTrace()
Deprecated.
The Configuration Manager is no longer used.
The effects of invoking this method are no longer defined.
|
static java.util.Properties |
withUUID(java.lang.String uuid)
Deprecated.
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.
|
deregisterListener, deregisterListener, elements, equals, getAdvancedProperties, getBasicProperties, getLastBIPMessages, getLastCompletionCode, getLastUpdateUser, getLongDescription, getManagedSubcomponent, getManagedSubcomponentFromStringRepresentation, getManagedSubcomponents, getManagedSubcomponents, getManagedSubcomponents, getManagedSubcomponents, getManagedSubcomponentsAsStrings, getManagedSubcomponentsAsStrings, getName, getNumberOfSubcomponents, getParent, getProperties, getProperty, getProperty, getProperty, getProperty, getRepositoryTimestamp, getShortDescription, getTimeOfLastCompletionCode, getTimeOfLastUpdate, getType, getUUID, hasBeenPopulatedByBroker, hasBeenPopulatedByBroker, hasBeenRestrictedByBroker, hasBeenRestrictedByBroker, hasBeenRestrictedByConfigManager, hasBeenRestrictedByConfigManager, hasBeenUpdatedByConfigManager, hasBeenUpdatedByConfigManager, isAwaitingSubmissionForCreation, isAwaitingSubmissionForDeletion, isDeployed, isShared, refresh, registerListener, registerListener, registerListener, setLongDescription, setName, setProperties, setShortDescription, toString, toVerboseString, unsubscribeFromConfigurationManagerUpdates, withName
public static final long MAX_WAIT_TIME
public static ConfigManagerProxy getInstance(ConfigManagerConnectionParameters cmcp) throws ConfigManagerProxyLoggedException
cmcp
- An object describing the connection parameters to the broker.
Cannot be null.ConfigManagerProxyLoggedException
- if a connection could not
be established for whatever reason.public void disconnect()
public void cancelDeployment() throws ConfigManagerProxyLoggedException
public DeployResult cancelDeployment(long timeToWaitMs) throws ConfigManagerProxyLoggedException
public void deregisterListeners()
Note: The same effect can be achieved by using ConfigManagerProxy.disconnect(). The difference is that this call doesn't close the link to the broker- it is possible to use call this method and still make use of the APIs and the listener registration mechanism.
public TopologyProxy getTopology() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the
dummy topology could not be created because the information was
not supplied from the broker before a timeout occurred.public static int getConfigManagerProxyVersion()
public TopicRootProxy getTopicRoot() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the dummy topic tree could not be determined because
the information was not supplied from the broker before a
timeout occurred.public SubscriptionsProxy getSubscriptions(java.lang.String topic, java.lang.String brokers, java.lang.String users, java.lang.String subscriptionsPoints, java.util.GregorianCalendar startDate, java.util.GregorianCalendar endDate) throws ConfigManagerProxyLoggedException
topic
- Not usedbrokers
- Not usedusers
- Not usedsubscriptionsPoints
- Not usedstartDate
- Not usedendDate
- Not usedConfigManagerProxyLoggedException
- if the request could not
be sent to the broker.public LogProxy getLog() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the log could not be retrieved because
the information was not supplied from the broker before a
timeout occurred.public ConfigurationObjectType getConfigurationObjectTypeOfParent()
getConfigurationObjectTypeOfParent
in class AdministeredObject
public static void setRetryCharacteristics(int maxRetries, int baseRetryWaitTime, int retryWaitTimeIncrement)
The IBM Integration API (CMP) might 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). This can happen if the proxy has a slow link to the broker, or if the broker 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 Administraton API should poll incoming messages from the broker 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.
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)
The IBM Integration API (CMP) might 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). This can happen if the proxy has a slow link to the broker, or if the broker is heavily burdened or just not running.
maxWaitTimeMs
- the maximum length of time the
IBM Integration API (CMP) can wait for a response from the
broker before a
ConfigManagerProxyPropertyNotInitalizedException is thrown.
The maximum value allowed value is BrokerProxy.MAX_WAIT_TIME
If the supplied value is greater than this,
BrokerProxy.MAX_WAIT_TIME will be used instead.public static void enableConfigManagerProxyTracing(java.lang.String filename) throws ConfigManagerProxyLoggedException
filename
- File spec of the output file, which cannot be null.ConfigManagerProxyLoggedException
- if the logger could not
be instantiated.public static void disableConfigManagerProxyTracing()
public static void setLogger(java.lang.String className, java.lang.String params) throws ConfigManagerProxyLoggedException
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 loggerConfigManagerProxyLoggedException
- if the logger could
not be instantiated.public static void setLogger(java.lang.String className) throws ConfigManagerProxyLoggedException
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.ConfigManagerProxyLoggedException
- if the logger could
not be instantiated.public void beginUpdates() throws ConfigManagerProxyLoggedException
ConfigManagerProxyLoggedException
- if a batch is already
in progress.sendUpdates()
,
clearUpdates()
,
isBatching()
public void sendUpdates() throws ConfigManagerProxyLoggedException
ConfigManagerProxyLoggedException
- If a batch was not
in progress, if the batch contained no requests, or if
the request could not be sent to the broker.beginUpdates()
,
clearUpdates()
,
isBatching()
public void sendUpdates(int correlationID) throws ConfigManagerProxyLoggedException
correlationID
- Identifier that will accompany any actionresponse
messages sent back to the caller through the AdministeredObjectListener
interface.ConfigManagerProxyLoggedException
- if a batch was not
in progress, if the batch contained no requests or if the request could not
be sent to the broker.beginUpdates()
,
sendUpdates()
,
clearUpdates()
,
isBatching()
public void clearUpdates()
beginUpdates()
,
sendUpdates()
,
isBatching()
public boolean isBatching()
beginUpdates()
,
sendUpdates()
,
clearUpdates()
public boolean isIncompatible()
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).
public boolean isIncompatible(boolean waitIfNotUpdated)
waitIfNotUpdated
- If this is set to true and
the administered object has not yet received an
update from the broker, the call will block
until the first response is received
(or the timeout configured in
ConfigManagerProxy.setRetryCharacteristics() occurs).public void startSystemTrace() throws ConfigManagerProxyLoggedException
public void stopSystemTrace() throws ConfigManagerProxyLoggedException
public void startDebugSystemTrace() throws ConfigManagerProxyLoggedException
public int getConfigManagerVersion() throws ConfigManagerProxyPropertyNotInitializedException
public int getAutoDiscoveryIntervalMins() throws ConfigManagerProxyPropertyNotInitializedException
public void setAutoDiscoveryIntervalMins(int newIntervalMins) throws ConfigManagerProxyLoggedException
public java.lang.String getConfigManagerFullVersion() throws ConfigManagerProxyPropertyNotInitializedException
public java.lang.String getConfigManagerOSName() throws ConfigManagerProxyPropertyNotInitializedException
public java.lang.String getConfigManagerOSArch() throws ConfigManagerProxyPropertyNotInitializedException
public java.lang.String getConfigManagerOSVersion() throws ConfigManagerProxyPropertyNotInitializedException
public static java.util.Properties withUUID(java.lang.String uuid)
uuid
- property to setpublic ConfigurationObjectType getConfigurationObjectType()
getConfigurationObjectType
in class AdministeredObject
public AccessControlEntry[] getAccessControlEntries()
public void setAccessControlEntries(AccessControlEntry[] accessControlList) throws ConfigManagerProxyLoggedException
public void addAccessControlEntries(AccessControlEntry[] accessControlList) throws ConfigManagerProxyLoggedException
public void removeAccessControlEntries(AccessControlEntry[] accessControlList) throws ConfigManagerProxyLoggedException