|
WBI BrokersTM Config Manager Proxy API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.broker.config.proxy.AdministeredObject
com.ibm.broker.config.proxy.ConfigManagerProxy
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
Method Summary | |
---|---|
void |
beginUpdates()
Tells the ConfigManagerProxy to hold back from sending any subsequent state-changing requests to the Config Manager, so multiple requests can be later sent off in a single message (or "batch"). |
void |
cancelDeployment()
Tells the Configuration Manager to cancel ALL deployment actions in the domain that are currently in progress. |
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. |
static void |
disableConfigManagerProxyTracing()
Stops Config Manager Proxy service tracing. |
void |
disconnect()
Deregisters all listeners registered to this ConfigManagerProxy instance and closes the link to the Config Manager. |
static void |
enableConfigManagerProxyTracing(String filename)
Enables Config Manager Proxy service tracing, sending output to the file with the supplied name. |
String |
getConfigManagerFullVersion()
Returns the full version string of the Configuration Manager to which this Config Manager Proxy instance is connected. |
String |
getConfigManagerOSArch()
Returns a string describing the architecture of the Configuration Manager machine to which this Config 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 Config Manager Proxy is connected. |
String |
getConfigManagerOSVersion()
Returns a string describing the version of the operation system on the Configuration Manager machine to which this Config Manager Proxy is connected. |
static int |
getConfigManagerProxyVersion()
Returns the version string for the Config Manager Proxy. |
int |
getConfigManagerVersion()
Returns the major version identifier of the Configuration Manager to which the Config 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. |
static ConfigManagerProxy |
getInstance(ConfigManagerConnectionParameters cmcp)
Asks the Config 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 topic,
String brokers,
String users,
String subscriptionsPoints,
GregorianCalendar startDate,
GregorianCalendar endDate)
Generates a SubscriptionsProxy that represents those subscriptions fulfilling the supplied criteria. |
TopicRootProxy |
getTopicRoot()
Returns the RootTopicProxy object associated with this Config Manager. |
TopologyProxy |
getTopology()
Returns the TopologyProxy object associated with this Config 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 Config Manager Proxy has received a message from the Configuration Manager which indicates that the Configuration Manager is unable to process requests from this Config Manager Proxy because the versions are not compatible. |
boolean |
isIncompatible(boolean waitIfNotUpdated)
Returns true if and only if the Config Manager Proxy has received a message from the Configuration Manager which indicates that the Configuration Manager is unable to process requests from this Config Manager Proxy because the versions are not compatible. |
void |
sendUpdates()
Tells the ConfigManagerProxy to send to the Config Manager all requests received since the beginUpdates() call. |
void |
sendUpdates(int correlationID)
Tells the ConfigManagerProxy to send to the Config Manager all requests received since the beginUpdates() call. |
static void |
setLogger(String className)
If directed to gather Config Manager Proxy trace for IBM service, do not use this method - use enableTracing(String) and disableTracing() instead. |
static void |
setLogger(String className,
String params)
Initializes a Config Manager Proxy logger. |
static void |
setRetryCharacteristics(int maxRetries,
int baseRetryWaitTime,
int retryWaitTimeIncrement)
Sets the retry characteristics for the Config Manager Proxy. |
static void |
setRetryCharacteristics(long maxWaitTimeMs)
Sets the retry characteristics for the Config 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. |
String |
toString()
Displays the name of the object |
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static ConfigManagerProxy getInstance(ConfigManagerConnectionParameters cmcp) throws ConfigManagerProxyLoggedException
cmcp
- An object describing the transport to
use, and any connection parameters required, to connect to the Configuration Manager.
ConfigManagerProxyLoggedException
- if a connection could not
be established for whatever reason.public void disconnect()
public void cancelDeployment() throws ConfigManagerProxyLoggedException
ConfigManagerProxyLoggedException
- if the request
could not be sent to the Config Manager.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 Config Manager- 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
Topology subcomponent could not be loaded because the Config
Manager has not yet supplied the required information.public static int getConfigManagerProxyVersion()
public TopicRootProxy getTopicRoot() throws ConfigManagerProxyPropertyNotInitializedException
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 ConfigManagerProxyLoggedException
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.
ConfigManagerProxyLoggedException
- if the request could not
be sent to the Configuration Manager.public LogProxy getLog() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the
Topology subcomponent could not be loaded because the Config
Manager has not yet supplied the required information.public ConfigurationObjectType getConfigurationObjectTypeOfParent()
getConfigurationObjectTypeOfParent
in class AdministeredObject
public static void setRetryCharacteristics(int maxRetries, int baseRetryWaitTime, int retryWaitTimeIncrement)
The Config 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 Config 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.
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 Config 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.
maxWaitTimeMs
- the maximum length of time the
Config Manager Proxy can wait for a response from the
Configuration Manager before a
ConfigManagerProxyPropertyNotInitalizedException is thrown.public static void enableConfigManagerProxyTracing(String filename) throws ConfigManagerProxyLoggedException
Not to be confused with startSystemTrace() and startDebugSystemTrace(), which enables tracing of the Configuration Manager.
filename
- File spec of the output file
ConfigManagerProxyLoggedException
- if the logger could not
be instantiated.public static void disableConfigManagerProxyTracing()
Not to be confused with stopSystemTrace(), which enables tracing of the Configuration Manager.
public static void setLogger(String className, 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 logger
ConfigManagerProxyLoggedException
- if the logger could
not be instantiated.public static void setLogger(String className) throws ConfigManagerProxyLoggedException
This method sets up an logger that does not require 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.
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 Config Manager.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 Config Manager.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 Config 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).
public void startSystemTrace() throws ConfigManagerProxyLoggedException
ConfigManagerProxyLoggedException
- if the request
to start system trace could not be sent to the
Config Manager.public void stopSystemTrace() throws ConfigManagerProxyLoggedException
ConfigManagerProxyLoggedException
- if the request
to stop system trace could not be sent to the
Config Manager.public void startDebugSystemTrace() throws ConfigManagerProxyLoggedException
ConfigManagerProxyLoggedException
- if the request
to start system trace could not be sent to the
Config Manager.public int getConfigManagerVersion() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if information on the Configuration Manager's version
was not supplied before a timeout occurred.public String getConfigManagerFullVersion() throws ConfigManagerProxyPropertyNotInitializedException
If the Config Manager Proxy is connected to a Configuration Manager of less than v6 level, this method returns null.
ConfigManagerProxyNotInitializedException
- if the version information was not supplied by the
Configuration Manager before a timeout occurred.
ConfigManagerProxyPropertyNotInitializedException
public String getConfigManagerOSName() throws ConfigManagerProxyPropertyNotInitializedException
If the Config Manager Proxy is connected to a Configuration Manager of less than v6 level, this method returns null.
ConfigManagerProxyNotInitializedException
- if the required information was not supplied by the
Configuration Manager before a timeout occurred.
ConfigManagerProxyPropertyNotInitializedException
public String getConfigManagerOSArch() throws ConfigManagerProxyPropertyNotInitializedException
If the Config Manager Proxy is connected to a Configuration Manager of less than v6 level, this method returns null.
ConfigManagerProxyNotInitializedException
- if the required information was not supplied by the
Configuration Manager before a timeout occurred.
ConfigManagerProxyPropertyNotInitializedException
public String getConfigManagerOSVersion() throws ConfigManagerProxyPropertyNotInitializedException
If the Config Manager Proxy is connected to a Configuration Manager of less than v6 level, this method returns null.
ConfigManagerProxyNotInitializedException
- if the required information was not supplied by the
Configuration Manager before a timeout occurred.
ConfigManagerProxyPropertyNotInitializedException
public static Properties withUUID(String uuid)
uuid
- property to set
public ConfigurationObjectType getConfigurationObjectType()
getConfigurationObjectType
in class AdministeredObject
public String toString()
toString
in class AdministeredObject
|
WBI BrokersTM Config Manager Proxy API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |