com.ibm.broker.config.proxy
Class ExecutionGroupProxy

java.lang.Object
  extended by com.ibm.broker.config.proxy.AdministeredObject
      extended by com.ibm.broker.config.proxy.ExecutionGroupProxy

public class ExecutionGroupProxy
extends AdministeredObject

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
 45112.7  2007-07-30  HDMPL           v6.1 release:
                                         Methods now return genericized types where relevant 
                                         Added getQueues()
                                         Added getNodeTypes()
                                         Added setRuntimeProperty(String, String)
                                         Added getRuntimeProperty(String)
                                         Added getRuntimePropertyNames()

 

Version:
Config/com/ibm/broker/config/proxy/ExecutionGroupProxy.java, CMP, S000 1.79

Method Summary
 void addAccessControlEntries(AccessControlEntry[] accessControlList)
          Adds this list to the list of access control entries that applies to this object.
 DeployResult deleteDeployedObjects(DeployedObject[] forDeletion, long timeToWaitMs)
          Asks the Configuration Manager to remove deployed objects from the execution group.
 DeployResult deleteDeployedObjectsByName(java.lang.String[] forDeletion, long timeToWaitMs)
          Asks the Configuration Manager to remove deployed objects from the execution group.
 void deploy(java.io.InputStream barStream)
          Starts an incremental deploy of the BAR file, whose contents are embedded in the supplied InputStream, to the execution group.
 DeployResult deploy(java.io.InputStream barStream, java.lang.String barFileLabel, boolean isIncremental, long timeToWaitMs)
          Starts a deploy of the BAR file, whose contents are embedded in the supplied InputStream, to the execution group.
 void deploy(java.lang.String barFileName)
          Starts an incremental deploy of the BAR file pointed to by the supplied filename, to the execution group.
 DeployResult deploy(java.lang.String barFileName, boolean isIncremental, long timeToWaitMs)
          Starts a deploy of the BAR file pointed to by the supplied filename, to the execution group.
 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.
 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(java.lang.String filename)
          Returns a reference to the deployed object with the supplied name (e.g.
 DeployedObject getDeployedObjectFromSubcomponentString(java.lang.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.
 java.util.Enumeration getDeployedObjects()
          Returns an Enumeration of all the objects deployed to the current execution group.
 java.util.Enumeration<DeployedObject> getDeployedObjects(java.lang.String fileExtension)
          Returns an enumeration of all the deployed objects with the supplied extension that are deployed to the current execution group.
 int getDeployedObjectsCount(java.lang.String name)
          Returns the number of deployed objects that match the supplied name.
 MessageFlowProxy getMessageFlow(java.util.Properties props)
          Returns the first MessageflowProxy object that matches the filter specified by the Properties argument.
 MessageFlowProxy getMessageFlowByName(java.lang.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.
 java.util.Enumeration<DeployedObject> getMessageFlowDependencies()
          Returns an Enumeration of all the dependencies deployed to the current execution group.
 java.util.Enumeration<MessageFlowProxy> getMessageFlows(java.util.Properties filter)
          Returns an enumeration of all the MessageFlowProxy objects that match the filter specified by the Properties argument.
 java.util.Enumeration getMessageSets()
          Returns an Enumeration of all the Message Sets deployed to the current execution group.
 java.lang.String[] getNodeTypes()
          Returns a list of the types of nodes used in this execution group.
 int getProcessorArchitecture()
          Returns the processor architecture of this execution group.
 java.lang.String[] getQueues()
          Returns a list of the MQ queues referenced by the message flows in use by this execution group.
 java.lang.String getRuntimeProperty(java.lang.String objectAndpropertyName)
          Returns the value of the runtime property with the supplied name.
 java.lang.String[] getRuntimePropertyNames()
          Returns a string array of all runtime configurable service properties associated with this object.
 boolean isRunning()
          Returns true if and only if the execution group is running.
 void removeAccessControlEntries(AccessControlEntry[] accessControlList)
          Deletes this list from the list of access control entries that applies to this object.
 void setAccessControlEntries(AccessControlEntry[] accessControlList)
          Sets the complete list of access control entries that apply to this object.
 void setRuntimeProperty(java.lang.String objectAndPropertyName, java.lang.String propertyValue)
          Asks the Configuration Manager to configure an arbitrary execution group property.
 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 java.util.Properties withName(java.lang.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 java.util.Properties withUUID(java.lang.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 com.ibm.broker.config.proxy.AdministeredObject
deregisterListener, deregisterListener, elements, 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, hasBeenRestrictedByConfigManager, hasBeenRestrictedByConfigManager, hasBeenUpdatedByConfigManager, hasBeenUpdatedByConfigManager, isAwaitingSubmissionForCreation, isAwaitingSubmissionForDeletion, isDeployed, isShared, refresh, registerListener, registerListener, registerListener, setLongDescription, setName, setProperties, setShortDescription, toString, toVerboseString, unsubscribeFromConfigurationManagerUpdates
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getMessageFlows

public java.util.Enumeration<MessageFlowProxy> getMessageFlows(java.util.Properties filter)
                                                        throws ConfigManagerProxyPropertyNotInitializedException
Returns an enumeration of all the MessageFlowProxy objects that match the filter specified by the Properties argument.

Parameters:
filter - Filter to select which message flows to return. Each key is an attribute name of the required object and each value is the required value of the attribute. A null or empty Properties object will match all message flows deployed to this execution group.
Returns:
Enumeration The MessageFlowProxy objects that matched the supplied filter.
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the execution groups could not be determined because up-to-date information on the broker has not yet been supplied.
See Also:
AttributeConstants

getMessageFlow

public MessageFlowProxy getMessageFlow(java.util.Properties props)
                                throws ConfigManagerProxyPropertyNotInitializedException
Returns the first MessageflowProxy object that matches the filter specified by the Properties argument. If multiple message flows match the supplied filter, an arbitrary match is returned.

Parameters:
props - Filter to select the MessageFlowProxy Each key is an attribute name of the required object and each value is the required value of the attribute. A null or empty Properties object will match an arbitrary message flow deployed to this execution group.
Returns:
MessageFlowProxy The first object that matched the supplied filter, or null if no objects matched.
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the execution groups could not be determined because up-to-date information on the broker has not yet been supplied.

getMessageFlowByName

public MessageFlowProxy getMessageFlowByName(java.lang.String messageFlowName)
                                      throws ConfigManagerProxyPropertyNotInitializedException
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.

Parameters:
messageFlowName - Name of the message flow to look up
Returns:
MessageFlowProxy Object representing the named message flow
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the list of available flows could not be determined because the Configuration Manager did not supply the execution group information to the Configuration Manager Proxy before a timeout occurred.

startMessageFlows

public void startMessageFlows()
                       throws ConfigManagerProxyLoggedException
Asks the broker to start all message flows in the deployed execution group.

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.

Throws:
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.

stopMessageFlows

public void stopMessageFlows(boolean immediate)
                      throws ConfigManagerProxyLoggedException
Invokes the stopMessageFlows() method for each Message Flow within the execution group's control.

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.

Parameters:
immediate - True if and only if the 'immediate' flag is to be used.
Throws:
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.

getMessageSets

public java.util.Enumeration getMessageSets()
                                     throws ConfigManagerProxyPropertyNotInitializedException
Returns an Enumeration of all the Message Sets deployed to the current execution group. The enumeration will have no elements if no message sets are deployed.

This method is the same as calling getDeployedObjects("dictionary").

Returns:
Enumeration Containing DeployedObject objects representing message sets.
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the message sets could not be determined because up-to-date information on the execution group has not yet been supplied.

getProcessorArchitecture

public int getProcessorArchitecture()
                             throws ConfigManagerProxyPropertyNotInitializedException
Returns the processor architecture of this execution group. Possible values are AttributeConstants.EG_PROCESSOR_ARCHITECTURE_32BIT and AttributeConstants.EG_PROCESSOR_ARCHITECTURE_64BIT, which represent 32-bit and 64-bit architectures respectively.

If the Configuration Manager to which this Configuration Manager Proxy is connected is of a version earlier than V6 Fixpack 01, all execution groups will be reported as 32-bit.

Returns:
int architecture of the execution group to which this object refers.
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the processor architecture information was not supplied by the Configuration Manager before a timeout occurred.

getDeployedObjectByName

public DeployedObject getDeployedObjectByName(java.lang.String filename)
                                       throws ConfigManagerProxyPropertyNotInitializedException
Returns a reference to the deployed object with the supplied name (e.g. "mset1") or fullname (e.g. "mset1.dictionary") that is deployed to the current execution group.

If there is more than one dependency that matches the supplied filter, an arbitrary (unspecified) 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.

Parameters:
filename - A non-null value means to return the object with the supplied name. A null value will return an arbitrary object deployed to this execution group.
Returns:
DeployedObject the matched object, or null if and only if a match could not be found.
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the message sets could not be determined because up-to-date information on the execution group has not yet been supplied.

getMessageFlowDependencies

public java.util.Enumeration<DeployedObject> getMessageFlowDependencies()
                                                                 throws ConfigManagerProxyPropertyNotInitializedException
Returns an Enumeration of all the dependencies deployed to the current execution group.

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.

Returns:
Enumeration Containing DeployedObject objects representing all dependencies deployed to this execution group.
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the message sets could not be determined because up-to-date information on the execution group has not yet been supplied.

getDeployedObjects

public java.util.Enumeration getDeployedObjects()
                                         throws ConfigManagerProxyPropertyNotInitializedException
Returns an Enumeration of all the objects deployed to the current execution group. This method is the same as calling getDeployedObjects(null).

This method discovers all objects deployed on the execution group, including message flows, message sets and others.

Returns:
Enumeration Containing DeployedObject objects. Each element represents one object deployed to this execution group.
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the message sets could not be determined because up-to-date information on the execution group has not yet been supplied.

getDeployedObjects

public java.util.Enumeration<DeployedObject> getDeployedObjects(java.lang.String fileExtension)
                                                         throws ConfigManagerProxyPropertyNotInitializedException
Returns an enumeration of all the deployed objects with the supplied extension that are deployed to the current execution group. The enumeration will have no elements if no matching objects are deployed.

Parameters:
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.
Returns:
Enumeration Containing DeployedObject objects. Each element represents one object deployed to the execution group.
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the deployed objects could not be determined because up-to-date information on the execution group has not yet been supplied.

getDeployedObjectsCount

public int getDeployedObjectsCount(java.lang.String name)
                            throws ConfigManagerProxyPropertyNotInitializedException
Returns the number of deployed objects that match the supplied name. Use this method before calling deleteDeployedObjectsByName() to ensure that the object being deleted is not ambiguously specified; a value greater than one means that the name requires greater precision. To avoid ambiguity, always specify deployed objects for deletion with their correct file extension; for example, "flow1.cmf" rather than "flow".

Parameters:
name - Name of the object to match
Returns:
int number of objects deployed to this execution group that match the supplied criterion.
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the deployed object's list

getDeployedObjectFromSubcomponentString

public DeployedObject getDeployedObjectFromSubcomponentString(java.lang.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. Otherwise, this method returns null.

Parameters:
subcomponentString - String representation of a subcomponent
Returns:
DeployedObject describing the object, or null if the string did not represent a deployable object.

setUserTrace

public void setUserTrace(MessageFlowProxy.UserTrace newTrace)
                  throws ConfigManagerProxyLoggedException,
                         ConfigManagerProxyPropertyNotInitializedException
Configures the user trace settings for every deployed message flow under the execution group's control.

Parameters:
newTrace - One of:
  • MessageFlowProxy.UserTrace.normal to enable normal user trace
  • MessageFlowProxy.UserTrace.debug to enable debug user trace
  • MessageFlowProxy.UserTrace.none to disable user trace
Throws:
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.

isRunning

public boolean isRunning()
                  throws ConfigManagerProxyPropertyNotInitializedException
Returns true if and only if the execution group is running.

Returns:
boolean True if and only if the attribute OBJECT_RUNSTATE_RUNNING is "running".
Throws:
ConfigManagerProxyPropertyNotInitializedException - - if, due to the administered object not having been updated by the Configuration Manager yet, the value of the run state is unknown.

deploy

public DeployResult deploy(java.lang.String barFileName,
                           boolean isIncremental,
                           long timeToWaitMs)
                    throws ConfigManagerProxyLoggedException,
                           java.io.IOException
Starts a deploy of the BAR file pointed to by the supplied filename, to the execution group.

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.

Parameters:
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:
  • A value of 0 causes the method to return immediately after the message has been successfully sent to the Configuration Manager.
  • A value of AttributeConstants.DEPLOYRESULT_SUPPRESSION causes the method to return null immediately after the message has been successfully sent to the Configuration Manager. DeployResult objects are relatively expensive to create and maintain, and so supplying this constant should be used if the DeployResult is not parsed, or if performance of the Configuration Manager Proxy application is critical.
  • A value of AttributeConstants.DEPLOYRESULT_WAIT_INDEFINITELY causes the method to wait until responses have been received from all brokers affected by the deploy.
  • If batch mode is enabled the method returns immediately regardless of the value of this parameter. All completion codes in the returned DeployResult object will be 'pending' unless the value of timeToWaitMs is AttributeConstants.DEPLOYRESULT_SUPPRESSION, in which case the DeployResult will be null (as usual).
Returns:
DeployResult object that can be used to query the results of the deployment.
Throws:
ConfigManagerProxyLoggedException - if the BAR file could not be sent to the Configuration Manager.
java.io.FileNotFoundException - if the file could not be found
java.io.IOException - if the file could not be closed. In this case the deployment may have succeeded.

deploy

public DeployResult deploy(java.io.InputStream barStream,
                           java.lang.String barFileLabel,
                           boolean isIncremental,
                           long timeToWaitMs)
                    throws ConfigManagerProxyLoggedException
Starts a deploy of the BAR file, whose contents are embedded in the supplied InputStream, to the execution group.

Parameters:
barStream - InputStream containing the BAR file contents. The first byte read by the stream must be the first byte of the BAR file's contents.
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:
  • A value of 0 causes the method to return immediately after the message has been successfully sent to the Configuration Manager.
  • A value of AttributeConstants.DEPLOYRESULT_SUPPRESSION causes the method to return null immediately after the message has been successfully sent to the Configuration Manager. DeployResult objects are relatively expensive to create and maintain, and so supplying this constant should be used if the DeployResult is not parsed, or if performance of the Configuration Manager Proxy application is critical.
  • A value of AttributeConstants.DEPLOYRESULT_WAIT_INDEFINITELY causes the method to wait until responses have been received from all brokers affected by the deploy.
  • If batch mode is enabled the method returns immediately regardless of the value of this parameter. All completion codes in the returned DeployResult object will be 'pending' unless the value of timeToWaitMs is AttributeConstants.DEPLOYRESULT_SUPPRESSION, in which case the DeployResult will be null (as usual).
Returns:
DeployResult object that can be used to query the results of the deployment.
Throws:
ConfigManagerProxyLoggedException - if the BAR file could not be sent to the Configuration Manager.

deploy

public void deploy(java.lang.String barFileName)
            throws ConfigManagerProxyLoggedException,
                   java.io.IOException
Starts an incremental deploy of the BAR file pointed to by the supplied filename, to the execution group. The method reads the contents of the file, enqueues the deployment message for the Configuration Manager and then immediately returns.

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.

Parameters:
barFileName - Path and file name of the BAR file, relative to the current directory.
Throws:
ConfigManagerProxyLoggedException - if the BAR file could not be sent to the Configuration Manager.
java.io.FileNotFoundException - if the file could not be found
java.io.IOException - if the file could not be closed. In this case the deployment may have succeeded.

deploy

public void deploy(java.io.InputStream barStream)
            throws ConfigManagerProxyLoggedException
Starts an incremental deploy of the BAR file, whose contents are embedded in the supplied InputStream, to the execution group. The method reads the contents of the file, enqueues the deployment message for the Configuration Manager and then immediately returns. The name of the BAR file will not be available to any DeployedObject objects that result from this deployment.

Parameters:
barStream - InputStream containing the BAR file contents. The first byte read by the stream must be the first byte of the BAR file's contents.
Throws:
ConfigManagerProxyLoggedException - if the BAR file could not be sent to the Configuration Manager.

deleteDeployedObjects

public DeployResult deleteDeployedObjects(DeployedObject[] forDeletion,
                                          long timeToWaitMs)
                                   throws ConfigManagerProxyLoggedException
Asks the Configuration Manager to remove deployed objects from the execution group.

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.

Parameters:
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. If an element in the array is null, the element is ignored.
timeToWaitMs - A positive value describes the maximum length of time to wait for broker responses (in milliseconds) before returning the DeployResult. Alternatively:
  • A value of 0 causes the method to return immediately after the message has been successfully sent to the Configuration Manager.
  • A value of AttributeConstants.DEPLOYRESULT_SUPPRESSION causes the method to return null immediately after the message has been successfully sent to the Configuration Manager. DeployResult objects are relatively expensive to create and maintain, and so supplying this constant should be used if the DeployResult is not parsed, or if performance of the Configuration Manager Proxy application is critical.
  • A value of AttributeConstants.DEPLOYRESULT_WAIT_INDEFINITELY causes the method to wait until the response has been received from the broker affected by the deploy.
  • If batch mode is enabled the method returns immediately regardless of the value of this parameter. All completion codes in the returned DeployResult object will be 'pending' unless the value of timeToWaitMs is AttributeConstants.DEPLOYRESULT_SUPPRESSION, in which case the DeployResult will be null (as usual).
Throws:
ConfigManagerProxyLoggedException - if the request could not be sent to the Configuration Manager

deleteDeployedObjectsByName

public DeployResult deleteDeployedObjectsByName(java.lang.String[] forDeletion,
                                                long timeToWaitMs)
                                         throws ConfigManagerProxyLoggedException,
                                                ConfigManagerProxyPropertyNotInitializedException
Asks the Configuration Manager to remove deployed objects from the execution group.

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.

Parameters:
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. If the array is null or empty, this method does nothing. If an element in the array is null, the element is ignored.
timeToWaitMs - A positive value describes the maximum length of time to wait for broker responses (in milliseconds) before returning the DeployResult. Alternatively:
  • A value of 0 causes the method to return immediately after the message has been successfully sent to the Configuration Manager.
  • A value of AttributeConstants.DEPLOYRESULT_SUPPRESSION causes the method to return null immediately after the message has been successfully sent to the Configuration Manager. DeployResult objects are relatively expensive to create and maintain, and so supplying this constant should be used if the DeployResult is not parsed, or if performance of the Configuration Manager Proxy application is critical.
  • A value of AttributeConstants.DEPLOYRESULT_WAIT_INDEFINITELY causes the method to wait until the response has been received from the broker affected by the deploy.
  • If batch mode is enabled the method returns immediately regardless of the value of this parameter. All completion codes in the returned DeployResult object will be 'pending' unless the value of timeToWaitMs is AttributeConstants.DEPLOYRESULT_SUPPRESSION, in which case the DeployResult will be null (as usual).
Throws:
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.

withUUID

public static java.util.Properties withUUID(java.lang.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*() calls. For example, broker1.getExecutionGroup(ExecutionGroup.withUUID("1234")); will return the execution group with UUID "1234" that exists in broker1.

Returns:
java.util.Properties - a new Properties object with the relevant key/value pairs set.

withName

public static java.util.Properties withName(java.lang.String name)
Returns a new Properties object that has the UUID attribute set to the supplied String, and the type attribute to be the name of the subclass of AdministeredObject being used. This provides an easy way of supplying filters to the get*() calls. For example, broker1.getManagedSubcomponent(ExecutionGroup.withName("eg1")); will return the execution group with Name "eg1" that exists in broker1.

Returns:
java.util.Properties - a new Properties object with the relevant key/value pairs set.

getConfigurationObjectType

public ConfigurationObjectType getConfigurationObjectType()
Returns the ConfigurationObjectType associated with this AdministeredObject type.

Specified by:
getConfigurationObjectType in class AdministeredObject
Returns:
ConfigurationObjectType associated with this class.

getConfigurationObjectTypeOfParent

public ConfigurationObjectType getConfigurationObjectTypeOfParent()
Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type.

Specified by:
getConfigurationObjectTypeOfParent in class AdministeredObject
Returns:
ConfigurationObjectType associated with the logical parent of this class.

getAccessControlEntries

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.

setAccessControlEntries

public void setAccessControlEntries(AccessControlEntry[] accessControlList)
                             throws ConfigManagerProxyLoggedException
Sets 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.
ConfigManagerProxyPropertyNotInitializedException - if this objects current list of Access Control Entries was not supplied by the Configuration Manager before a timeout occurred.

addAccessControlEntries

public void addAccessControlEntries(AccessControlEntry[] accessControlList)
                             throws ConfigManagerProxyLoggedException
Adds 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:
ConfigManagerProxyLoggedException
ConfigManagerProxyLoggedException - if the request to update the object could not be sent to the Configuration Manager.

removeAccessControlEntries

public void removeAccessControlEntries(AccessControlEntry[] accessControlList)
                                throws ConfigManagerProxyLoggedException
Deletes 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.

setRuntimeProperty

public void setRuntimeProperty(java.lang.String objectAndPropertyName,
                               java.lang.String propertyValue)
                        throws ConfigManagerProxyLoggedException
Asks the Configuration Manager to configure an arbitrary execution group property. The set of properties configurable using this method are those that can be manipulated using the mqsichangeproperties command that has the -e flag specified.

To set runtime properties that affect the broker, use BrokerProxy.setRuntimeProperty(). To set runtime properties that affect the broker's HTTP listener, use BrokerProxy.setHTTPListenerProperty(). To set runtime properties for a broker's configurable service, use BrokerProxy.setConfigurableServiceProperty().

After calling this method, getParent().deploy() needs to be called in order to deploy the changed configuration to the broker. It is possible to change multiple runtime properties and invoke the deployment just once at the end.

Constants exist for many common objectAndPropertyName values in the RuntimePropertyConstants interface, and you should use these wherever possible. To set properties that are not defined in this interface, the objectAndPropertyName parameter can also be made up of a String of the form "ObjectName/PropertyName", where ObjectName and PropertyName are the object and property names supplied on the -o and -n parameters* of mqsichangeproperties. For example, "DynamicSubscriptionEngine/userTraceLevel" would request a change to the execution group's user trace level property. The '/' separator is defined as RuntimePropertyConstants.OBJECT_NAME_DELIMITER.

The list of currently defined property names can be obtained using the method getRuntimePropertyNames(). However, not all runtime properties returned by this method can be set.

Parameters:
objectAndPropertyName - The complete object and property name of the property being manipulated
propertyValue - The new value to associate with the property
Throws:
ConfigManagerProxyLoggedException - if the request could not be sent to the Configuration Manager.

getRuntimePropertyNames

public java.lang.String[] getRuntimePropertyNames()
Returns a string array of all runtime configurable service properties associated with this object. Use getRuntimeProperty() to get the current value associated with a given property and setRuntimeProperty() to set it. Each String is of the form "ObjectName/PropertyName", where ObjectName and PropertyName are the object and property names supplied on the -o and -n parameters of mqsireportproperties. The '/' character that separates the two values is defined in RuntimePropertyConstants.OBJECT_NAME_DELIMITER.

Returns:
String[] containing configurable service property names that have been defined on the broker

getRuntimeProperty

public java.lang.String getRuntimeProperty(java.lang.String objectAndpropertyName)
                                    throws ConfigManagerProxyPropertyNotInitializedException
Returns the value of the runtime property with the supplied name. The set of properties discoverable in this way are those reported by the getRuntimePropertyNames() method.

If you wish to directly look up a specific named property, use constants defined in the RuntimePropertyConstants interface wherever possible. If a constant does not exist, the objectAndpropertyName parameter can be made up of a String of the form "ObjectName/PropertyName", where ObjectName and PropertyName are the object and property names supplied on the -o and -n parameters respectively of mqsireportproperties. The '/' separator is defined as RuntimePropertyConstants.OBJECT_NAME_DELIMITER.

Parameters:
objectAndpropertyName - The name of the property to be reported
Returns:
String The value of the supplied property. A value of null means that the property does not exist or has not been set on the broker.
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the information could not be determined because the Config Manager has not yet supplied it.

getQueues

public java.lang.String[] getQueues()
                             throws ConfigManagerProxyPropertyNotInitializedException
Returns a list of the MQ queues referenced by the message flows in use by this execution group. Only queues directly referenced by the following nodes are reported: Each element of the returned list contains any queue name parameter that was specified when each flow was deployed. If a queue manager name was also supplied this will be described in the same element, before the queue name and separated by a forward slash character ('/') - for example, "WBRK6_DEFAULT_QUEUE_MANAGER/TEST.QUEUE". The slash character is defined by the constant AttributeConstants.MESSAGEFLOW_QMGRQUEUE_DELIMITER.

This method works by aggregating the responses from calling the MessageFlowProxy.getQueues() method for each message flow that is currently deployed to the execution group.

This method will return an empty array if the connected Configuration Manager is of a version less than v6.1. Any message flows deployed through a Configuration Manager of a version earlier than v6.1 will not report any queues.

Returns:
String[] the names of the queues that were specified during deployment
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the information has not yet been supplied by the Configuration manager.

getNodeTypes

public java.lang.String[] getNodeTypes()
                                throws ConfigManagerProxyPropertyNotInitializedException
Returns a list of the types of nodes used in this execution group. The names returned are the internal names, which are unique for every node type.

This method works by aggregating the responses from calling the MessageFlowProxy.getNodeTypes() method for each message flow that is currently deployed to the execution group.

This method will return an empty array if the connected Configuration Manager is of a version less than v6.1, or if the message flow was deployed through a Configuration Manager of a version earlier than v6.1.

Returns:
String[] the names of the node types that were specified during deployment
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the information has not yet been supplied by the Configuration manager.