|
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.ExecutionGroupProxy
Each execution group associated with a broker can be represented by an ExecutionGroupProxy.
In order to use ExecutionGroupProxy objects, applications must first obtain handles to them. Here is an example of how to do this:
ConfigManagerConnectionParameters cmcp = MQConfigManagerConnectionParameters("localhost", 1414, "QMGR"); ConfigManagerProxy cmp = ConfigManagerProxy.getInstance(cmcp); TopologyProxy t = cmp.getTopology(); BrokerProxy b = t.getBrokerByName("BROKER1"); ExecutionGroupProxy e = b.getExecutionGroupByName("default");
com.ibm.broker.config.proxy.ExecutionGroupProxy extends
com.ibm.broker.config.proxy.AdministeredObject
|
|
Responsibilities | Acts as a container of deployed message flows. Provides the ability to deploy information to the execution group represented by each instance. |
Internal Collaborators | com.ibm.broker.config.proxy.MessageFlowProxy |
Change Activity: -------- ----------- ------------- ------------------------------------ Reason: Date: Originator: Comments: -------- ----------- ------------- ------------------------------------ 25103.7 2004-03-18 HDMPL v6 Release
Method Summary | |
---|---|
DeployResult |
deleteDeployedObjects(DeployedObject[] forDeletion,
long timeToWaitMs)
Asks the Configuration Manager to remove deployed objects from the execution group. |
DeployResult |
deleteDeployedObjectsByName(String[] forDeletion,
long timeToWaitMs)
Asks the Configuration Manager to remove deployed objects from the execution group. |
void |
deploy(InputStream barStream)
Starts an incremental deploy of the BAR file pointed to by the supplied filename, to the execution group. |
DeployResult |
deploy(InputStream barStream,
String barFileLabel,
boolean isIncremental,
long timeToWaitMs)
Starts a deploy of the BAR file pointed to by the supplied filename, to the execution group. |
void |
deploy(String barFileName)
Starts an incremental deploy of the BAR file pointed to by the supplied filename, to the execution group. |
DeployResult |
deploy(String barFileName,
boolean isIncremental,
long timeToWaitMs)
Starts a deploy of the BAR file pointed to by the supplied filename, to the execution group. |
ConfigurationObjectType |
getConfigurationObjectType()
Returns the ConfigurationObjectType associated with this AdministeredObject type. |
ConfigurationObjectType |
getConfigurationObjectTypeOfParent()
Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type. |
DeployedObject |
getDeployedObjectByName(String filename)
Returns a message flow dependency with the supplied name (e.g. |
DeployedObject |
getDeployedObjectFromSubcomponentString(String subcomponentString)
If the supplied string is the value part of a property in the dependency or subcomponent groups, AND it represents a DeployedObject instance (including subcomponents beginning with the v5 syntax 'messageset'), this method returns a DeployedObject instance that represents it. |
Enumeration |
getDeployedObjects()
Returns an Enumeration of all the objects deployed to the current execution group. |
Enumeration |
getDeployedObjects(String fileExtension)
Returns an enumeration of all the message flow dependencies with the supplied extension that are deployed to the current execution group. |
Enumeration |
getManagedSubcomponents(Properties filter)
Returns an Enumeration of MessageFlowProxy objects that match the supplied filter. |
Enumeration |
getManagedSubcomponents(Properties filter,
boolean returnContainsStrings)
Returns an Enumeration of MessageFlowProxy objects, or an Enumeration of Strings representing MessageFlowProxy objects, that match the supplied filter. |
MessageFlowProxy |
getMessageFlow(Properties props)
Returns the first MessageflowProxy object that matches the filter specified by the Properties argument. |
MessageFlowProxy |
getMessageFlowByName(String messageFlowName)
Returns the MessageFlowProxy object with the supplied name, or null if a flow of that name does not exist or if the supplied argument was null. |
Enumeration |
getMessageFlowDependencies()
Returns an Enumeration of all the dependencies deployed to the current execution group. |
Enumeration |
getMessageFlows(Properties filter)
Returns an enumeration of all the MessageFlowProxy objects that match the filter specified by the Properties argument. |
Enumeration |
getMessageSets()
Returns an Enumeration of all the Message Sets deployed to the current execution group. |
int |
getProcessorArchitecture()
Returns the processor architecture of this execution group. |
boolean |
isRunning()
Returns true if and only if the execution group is running. |
void |
setUserTrace(MessageFlowProxy.UserTrace newTrace)
Configures the user trace settings for every deployed message flow under the execution group's control. |
void |
startMessageFlows()
Asks the broker to start all message flows in the deployed execution group. |
void |
stopMessageFlows(boolean immediate)
Invokes the stopMessageFlows() method for each Message Flow within the execution group's control. |
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. |
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 Enumeration getManagedSubcomponents(Properties filter) throws ConfigManagerProxyPropertyNotInitializedException
getManagedSubcomponents
in class AdministeredObject
filter
- Filter to narrow down the search.
throws ConfigManagerProxyPropertyNotInitializedException
if the execution groups could not be determined because
up-to-date information on the broker has not yet been supplied.
ConfigManagerProxyPropertyNotInitializedException
- if the list of
available subcomponents could not be determined because the Config
Manager has not yet supplied them.public Enumeration getManagedSubcomponents(Properties filter, boolean returnContainsStrings) throws ConfigManagerProxyPropertyNotInitializedException
getManagedSubcomponents
in class AdministeredObject
filter
- Filter to narrow down the search.returnContainsStrings
- true only if the returned
enumeration should contain Strings. Set this flag avoids
creating relatively expensive AdministeredObject
instance unless they are actually required.
throws ConfigManagerProxyPropertyNotInitializedException
if the execution groups could not be determined because
up-to-date information on the broker has not yet been supplied.
ConfigManagerProxyPropertyNotInitializedException
- if the list of
available subcomponents could not be determined because the Config
Manager has not yet supplied them.public Enumeration getMessageFlows(Properties filter) throws ConfigManagerProxyPropertyNotInitializedException
filter
- Filter to select which message flows to return.
ConfigManagerProxyPropertyNotInitializedException
- if the execution groups could not be determined because
up-to-date information on the broker has not yet been supplied.public MessageFlowProxy getMessageFlow(Properties props) throws ConfigManagerProxyPropertyNotInitializedException
props
- Filter to select the MessageFlowProxy
ConfigManagerProxyPropertyNotInitializedException
- if the execution groups could not be determined because
up-to-date information on the broker has not yet been supplied.public MessageFlowProxy getMessageFlowByName(String messageFlowName) throws ConfigManagerProxyPropertyNotInitializedException
messageFlowName
-
ConfigManagerProxyPropertyNotInitializedException
- if the list of available flows could not be determined
because the Config Manager did not supply the execution group
information to the Config Manager Proxy before a timeout occurred.public void startMessageFlows() throws ConfigManagerProxyLoggedException
If this method is called before the execution group has been successfully deployed to the broker, a ConfigManagerProxyLoggedException will be thrown. In order to deploy the execution group, use one of the deploy() methods. Checking that isDeployed() returns true prior to this method will ensure that the execution group has been successfully deployed.
ConfigManagerProxyLoggedException
- if the
Configuration Manager has not yet received a confirmation
from the broker that the execution group has been
successfully deployed.
A ConfigManagerProxyLoggedException will also
be thrown if there were communication problems with the
Configuration Manager.public void stopMessageFlows(boolean immediate) throws ConfigManagerProxyLoggedException
If this method is called before the execution group has been successfully deployed to the broker, a ConfigManagerProxyLoggedException will be thrown. In order to deploy the execution group, use one of the deploy() methods. Checking that isDeployed() returns true prior to this method will ensure that the execution group has been successfully deployed.
immediate
- True if and only if the 'immediate' flag
is to be used.
ConfigManagerProxyLoggedException
- if the
Configuration Manager has not yet received a confirmation
from the broker that the execution group has been
successfully deployed.
A ConfigManagerProxyLoggedException will also
be thrown if there were communication problems with the
Configuration Manager.public Enumeration getMessageSets() throws ConfigManagerProxyPropertyNotInitializedException
This method is the same as calling getMessageFlowDependencies("dictionary").
ConfigManagerProxyPropertyNotInitializedException
- if the message sets could not be determined because
up-to-date information on the execution group has not yet
been supplied.public int getProcessorArchitecture() throws ConfigManagerProxyPropertyNotInitializedException
If the Configuration Manager to which this Config Manager Proxy is connected is of version 5.x, all execution groups will be reported as 32-bit.
ConfigManagerProxyPropertyNotInitializedException
- if the processor architecture information was not supplied
by the Configuration Manager before a timeout occurred.public DeployedObject getDeployedObjectByName(String filename) throws ConfigManagerProxyPropertyNotInitializedException
If there is more than one dependency that matches the supplied filter, an arbitrary (non-deterministic) match is returned.
This method discovers deployed objects that are required by message flows in order to run (e.g. message sets). In order to discover message flows themselves, use getMessageFlowByName() instead.
filename
- A non-null value means to return
the dependency with the supplied name. A null value will return
an arbitrary dependency of this execution group.
ConfigManagerProxyPropertyNotInitializedException
- if the message sets could not be determined because
up-to-date information on the execution group has not yet
been supplied.public Enumeration getMessageFlowDependencies() throws ConfigManagerProxyPropertyNotInitializedException
This method discovers deployed objects that are required by message flows in order to run (e.g. message sets). In order to discover everything deployed to this execution group (i.e. including message flows themselves), use getDeployedObjects() instead.
ConfigManagerProxyPropertyNotInitializedException
- if the message sets could not be determined because
up-to-date information on the execution group has not yet
been supplied.public Enumeration getDeployedObjects() throws ConfigManagerProxyPropertyNotInitializedException
This method discovers all objects deployed on the execution group, including message flows, message sets and others.
ConfigManagerProxyPropertyNotInitializedException
- if the message sets could not be determined because
up-to-date information on the execution group has not yet
been supplied.public Enumeration getDeployedObjects(String fileExtension) throws ConfigManagerProxyPropertyNotInitializedException
This method discovers deployed objects that are required by message flows in order to run (e.g. message sets). In order to discover message flows themselves, use getMessageFlows() instead.
fileExtension
- A non-null value means to filter
the results so only those dependencies with the supplied
file extension are returned. A null value will return
all dependencies deployed to this execution group.
ConfigManagerProxyPropertyNotInitializedException
- if the message sets could not be determined because
up-to-date information on the execution group has not yet
been supplied.public DeployedObject getDeployedObjectFromSubcomponentString(String subcomponentString)
subcomponentString
- String representation of a subcomponent
public void setUserTrace(MessageFlowProxy.UserTrace newTrace) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException
newTrace
- One of:
ConfigManagerProxyLoggedException
- if the request could not be
sent to the Configuration Manager.
ConfigManagerProxyPropertyNotInitializedException
- if the
list of message flows could not be determined because the information
was not supplied from the Configuration Manager before a timeout
occurred.public boolean isRunning() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- -
if, due to the administered object not having
been updated by the Configuration Manager yet,
the value of the run state is unknown.public DeployResult deploy(String barFileName, boolean isIncremental, long timeToWaitMs) throws ConfigManagerProxyLoggedException, IOException
If the connected Configuration Manager is of at least version 6, the supplied filename will be used as the return value from getBARFileName() for any DeployedObject instances that result from this deploy operation.
barFileName
- - Path and file name of the BAR file,
relative to the current directory.isIncremental
- If true, the contents of the BAR
file will add or modify what has already been
deployed on the execution group.
If false, the contents of the execution group will
be completely cleared before deployment (also known
as a "complete" deploy).timeToWaitMs
- A positive value describes the
maximum length of time to wait for broker responses
(in milliseconds) before returning the DeployResult.
Alternatively:
ConfigManagerProxyLoggedException
- if the BAR file
could not be sent to the Config Manager.
FileNotFoundException
- if the file could
not be found
IOException
- if the file could not be closed.
In this case the deployment may have succeeded.public DeployResult deploy(InputStream barStream, String barFileLabel, boolean isIncremental, long timeToWaitMs) throws ConfigManagerProxyLoggedException
barStream
- InputStream containing the BAR file.barFileLabel
- the name of the BAR file being
deployed. Every DeployedObject that results from
this deployment will return this value (which may be null)
from the getBARFileName() method. Setting the parameter
will have no effect if the connected Configuration Manager
is of a version earlier than v6.isIncremental
- If true, the contents of the BAR
file will add or modify what has already been
deployed on the execution group.
If false, the contents of the execution group will
be completely cleared before deployment (also known
as a "complete" deploy).timeToWaitMs
- A positive value describes the
maximum length of time to wait for broker responses
(in milliseconds) before returning the DeployResult.
Alternatively:
ConfigManagerProxyLoggedException
- if the BAR file
could not be sent to the Config Manager.public void deploy(String barFileName) throws ConfigManagerProxyLoggedException, IOException
If the connected Configuration Manager is of at least version 6, the supplied filename will be used as the return value from getBARFileName() for any DeployedObject instances that result from this deploy operation.
barFileName
- Path and file name of the BAR file,
relative to the current directory.
ConfigManagerProxyLoggedException
- if the BAR file
could not be sent to the Config Manager.
FileNotFoundException
- if the file could
not be found
IOException
- if the file could not be closed.
In this case the deployment may have succeeded.public void deploy(InputStream barStream) throws ConfigManagerProxyLoggedException
barStream
- InputStream containing the BAR file.
ConfigManagerProxyLoggedException
- if the BAR file
could not be sent to the Config Manager.public DeployResult deleteDeployedObjects(DeployedObject[] forDeletion, long timeToWaitMs) throws ConfigManagerProxyLoggedException
Note: This method causes information to be deployed to the broker and so calls to this method should be minimized. For example, should multiple objects require removal from the execution group, it is preferable to pass in all objects in a single call to this method rather than have this method called once for each object.
forDeletion
- representing the DeployedObject objects
that require deletion (e.g. message flows, message sets).
If the value is null or empty, this method does nothing.timeToWaitMs
- A positive value describes the
maximum length of time to wait for broker responses
(in milliseconds) before returning the DeployResult.
Alternatively:
ConfigManagerProxyLoggedException
- if the request could
not be sent to the Configuration Managerpublic DeployResult deleteDeployedObjectsByName(String[] forDeletion, long timeToWaitMs) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException
Note: This method causes information to be deployed to the broker and so calls to this method should be minimized. For example, should multiple objects require removal from the execution group, it is preferable to pass in all objects in a single call to this method rather than have this method called once for each object.
It is acceptable to remove objects of different types in the same request. It is the caller's responsibility to ensure that the supplied names refer to exactly one object deployed in the execution group. If a deployed object with the supplied name cannot be found, that element of the array is ignored and no exception is thrown. If an ambiguous String is supplied (e.g. "doc1" when "doc1.xsl" and "doc1.dictionary" are both deployed) then the call will fail with ConfigManagerProxyLoggedException.
forDeletion
- An array of Strings, with each element
being the name (e.g. "mf1") or fullname (e.g. "mf1.cmf")
of an object that is to be removed from the execution group.timeToWaitMs
- A positive value describes the
maximum length of time to wait for broker responses
(in milliseconds) before returning the DeployResult.
Alternatively:
ConfigManagerProxyLoggedException
- if the request could
not be sent to the Configuration Manager, or if at least one
supplied name is ambiguous.
ConfigManagerProxyPropertyNotInitializedException
- if
the deployed objects could not be discovered because the
required information was not received from the Configuration
Manager before a timeout occurred.public static Properties withUUID(String uuid)
public static Properties withName(String name)
public ConfigurationObjectType getConfigurationObjectType()
getConfigurationObjectType
in class AdministeredObject
public ConfigurationObjectType getConfigurationObjectTypeOfParent()
getConfigurationObjectTypeOfParent
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 |