com.ibm.broker.config.proxy

Class BrokerProxy



  • public class BrokerProxy
    extends AdministeredObject

    Each BrokerProxy instance represents a broker and all of its configuration and operational state.

    BrokerProxy objects are the root of an administration object hierarchy, and are obtained by describing the connection details of the broker and passing them to either the getInstance or getlocalInstance methods of this class. For example, to connect to the locally defined broker "MYBROKER":

         BrokerProxy b = BrokerProxy.getLocalInstance("MYBROKER");
     

    Alternatively, to connect to the remote broker on the machine "mymachine.mydomain.com", port 4414:

         BrokerProxy b = BrokerProxy.getInstance(
             new IntegrationNodeConnectionParameters("mymachine.domain.com", 4414)); 
     

    com.ibm.broker.config.proxy.BrokerProxy extends com.ibm.broker.config.proxy.AdministeredObject

    Responsibilities Acts as a container of execution groups. Provides the ability to deploy to execution groups. Provides the ability to control the deployed message flows for all owned execution groups.
    Internal Collaborators com.ibm.broker.config.proxy.ExecutionGroupProxy
    
     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 setRuntimeProperty(String, String)
                                             Added getRuntimeProperty(String)
                                             Added getRuntimePropertyNames()
                                             Added setHTTPListenerProperty(String, String)
                                             Added getHTTPListenerProperty(String)
                                             Added getHTTPListenerPropertyNames()
                                             Added setConfigurableServiceProperty(String, String)
                                             Added getConfigurableServiceProperty(String)
                                             Added getConfigurableServicePropertyNames()
                                             Added setRegistryProperty(String, String)
                                             Added getRegistryProperty(String)
                                             Added getRegistryPropertyNames()
                                             Added SyncType enum
                                             Added getLastDiscoveryTime(SyncType)
                                             Deprecated getters and setters that can be controlled as runtime properties  
                                             Added getQueues()
                                             Added getNodeTypes()
                                             Added discoverConfiguration()
                                             Added getAutoDiscoveryEnabled()
                                             Added setAutoDiscoveryEnabled(boolean)
                                             Added PolicyType enum
                                             Added getPolicySet(PolicyType, String)
                                             Added getPolicySetBindings(PolicyType, String)
                                             Added getPolicySetBindingsNames()
                                             Added getPolicySetNames()
     48003.3  2008-01-08  HDMPL           v6.1.0.2 release:
                                             Added getOperationMode()
                                             Added getOperationModeValidity()
                                             Added getOperationModeViolations()
     51619.1  2008-07-17  HDMPL           v7 release:
                                             Deprecated all methods related to publish/subscribe
                                             Deprecated all methods specific to Configuration Manager connections
                                             Deprecated immediate parameter on stopMessageFlows()
                                             Deprecated getRuntimeProperty()
                                             Deprecated getRuntimePropertyNames()
                                             Deprecated setRuntimeProperty()
                                             Overridden setName() (now throws an exception)
                                             Added getLog()
                                             Added getInstance()
                                             Added getBrokerVersion()
                                             Added getBrokerLongVersion()
                                             Added getBrokerOSArch()
                                             Added getBrokerOSName()
                                             Added getBrokerOSVersion()
                                             Added getAdministrationAPIVersion()
                                             Added setRetryCharacteristics() and MAX_WAIT_TIME
                                             Added getLocalInstance()
                                             Added getConfigurableService()
                                             Added getConfigurableServices()
                                             Added getConfigurableServiceTypes()
                                             Added createConfigurableService()
                                             Added deleteConfigurableService()
                                             Added isAdminSecurityEnabled()
                                             Added getResourceTypeNames()
                                             Added getResourceTypeStatisticsPropertyNames()
     51619.40 2009-05-26  HDCAB              Added getAdministrationQueue()
     61984.1  2011-11-11  HDCAB           v8 release:
                                             Added getModesOfOperation()
                                             
     
    Version %Z% %I% %W% %E% %U% [%H% %T%]
    • Field Detail

      • MAX_WAIT_TIME

        public static final long MAX_WAIT_TIME
        The maximum amount of time the IBM Integration API (CMP) can be told to wait for broker messages before a ConfigManagerProxyPropertyNotInitialisedException is thrown. The actual value used can be set using BrokerProxy.setRetryCharacteristics(long).
        See Also:
        Constant Field Values
    • Method Detail

      • disconnectAll

        public static void disconnectAll()
        This method will cause all broker proxies in the current process to disconnect and become unusable. This method is intended to assist a clean shutdown of connections upon process termination.
      • getBrokerLongVersion

        public java.lang.String getBrokerLongVersion()
                                              throws ConfigManagerProxyPropertyNotInitializedException
        Returns the complete version identifier of the broker to which the application is connected. The returned string will identify a unique build level from which the broker runtime was derived. The format of the string is not guaranteed.
        Returns:
        String complete version identifier
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if information on the broker's version was not supplied before a timeout occurred.
      • getAdministrationAPIVersion

        public static int getAdministrationAPIVersion()
        Returns the version number of the IBM Integration API (CMP). When an application uses a given level of IntegrationAPI.jar, this method always returns the same value.
        Returns:
        int constant value
      • beginUpdates

        public void beginUpdates()
                          throws ConfigManagerProxyLoggedException
        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"). Requests for information (for instance, requests to discover an object's attributes) will not be batched. The scope of this method is for any requests using this BrokerProxy connection to the broker.
        Throws:
        ConfigManagerProxyLoggedException - if a batch is already in progress.
        See Also:
        sendUpdates(), clearUpdates(), isBatching()
      • sendUpdates

        public void sendUpdates(int correlationID)
                         throws ConfigManagerProxyLoggedException
        Tells the IBM Integration API (CMP) to send to the broker all requests received since the beginUpdates() call. After this method completes, subsequent requests will not be batched unless another beginUpdates() is called.
        Parameters:
        correlationID - Identifier that will accompany any actionresponse messages sent back to the caller through the AdministeredObjectListener interface.
        Throws:
        ConfigManagerProxyLoggedException - if a batch was not in progress, if the batch contained no requests or if the request could not be sent to the broker.
        See Also:
        beginUpdates(), sendUpdates(), clearUpdates(), isBatching()
      • clearUpdates

        public void clearUpdates()
        Tells the IBM Integration API (CMP) to discard any state-changing requests received since the last call to beginUpdates(). If a batch was not in progress, or if the current batch has already been submitted using sendUpdates(), this call does nothing.
        See Also:
        beginUpdates(), sendUpdates(), isBatching()
      • isBatching

        public boolean isBatching()
        Returns true if and only if the creation of a batch is currently in progress.
        Returns:
        boolean status of batch mode
        See Also:
        beginUpdates(), sendUpdates(), clearUpdates()
      • setSynchronous

        public void setSynchronous(int timeToWaitMs)
        Configures whether the IBM Integration API (CMP) should wait for broker configuration changes to be fully completed before returning to the caller.

        For all new IBM Integration API (CMP) applications*, the default behavior is for all property change methods to return immediately after the change request has been queued for processing at the broker. This means that if a method to return a property's value is called immediately after setting it, the old value is typically returned as the request is unlikely yet to have been processed and a response returned.

        A positive timeToWaitMs parameter to this method causes configuration change methods to pause until a positive or negative response is received by the broker, which means that a successful return from the property change method implies that the broker successfully processed the request. In this case, if the configuration change request is rejected by the broker, a ConfigManagerProxyRequestFailedException is thrown. If the broker does not respond in the configured time period, a ConfigManagerProxyRequestTimeoutException is thrown (which does not mean that the request to set the property failed).

        This method affects all subsequent calls to all methods based on AdministeredObject.setProperties(), AdministeredObject.createManagedSubcomponent() and AdministeredObject.deleteManagedSubcomponents(). This includes all variants of setShortDescription(), setLongDescription(), startMessageFlows(), stopMessageFlows(), createExecutionGroup(), createConfigurableService(), deleteExecutionGroup(), deleteConfigurableService() and set*RuntimeProperty(). It affects this BrokerProxy instance and all ExecutionGroupProxy and MessageFlowProxy children that are derived from it. Deployment methods such as ExecutionGroupProxy.deploy() and ExecutionGroupProxy.deleteDeployedObjects() are unaffected by this setting, as it is possible to configure synchronous behavior directly on these method calls.

        Enabling synchronous behavior is not recommended when the IBM Integration API (CMP) application is deployed inside a JavaCompute node. This is because, if the application subsequently invokes a method to affect the message flow in which the IBM Integration API (CMP) application is running, the application might deadlock and the operation will time out.

        *If you are running a V6.x CMP application connected through the deprecated ConfigManagerProxy root object, the default behavior is to run synchronously with a time limit of 60 seconds. This is to emulate the single-threaded nature of the old Configuration Manager; the broker now processes administration requests on multiple threads, and so any call to BrokerProxy.deploy() will no longer guarantee that any previous set*Property() calls will have completed by the time deploy() returns. Making these older applications synchronous by default helps ensure that the deploy() method continues to work as it did previously.

        Parameters:
        timeToWaitMs - A positive value describes the maximum length of time to wait for broker responses (in milliseconds) before the change property method returns. Alternatively:
        • A value of 0 causes methods to disable synchronous updates, that is, to return immediately after the message has been successfully sent to the connected broker. This is the default behavior for all new applications.
        • A value of -1 causes methods to wait indefinitely, until a response has been received from the broker. A ConfigManagerProxyRequestTimeoutException cannot be thrown if this value is set.
        • If batch mode is enabled the change property method returns immediately regardless of the value of this parameter.
      • getSynchronous

        public int getSynchronous()
        Returns a int describing how synchronous property change methods have been configured to be.
        • A positive return value indicates the maximum length of time that the IBM Integration API (CMP) application will wait for for broker responses (in milliseconds).
        • A return value of -1 means that property change methods will wait indefinitely, until a response is received from the broker.
        • Alternatively, a return value of 0 means that property change methods return immediately after the change request has been queued for processing at the broker. This is the default behavior.
        Returns:
        Value of the IBM Integration API (CMP) synchronous update setting.
      • getLocalInstance

        public static BrokerProxy getLocalInstance(java.lang.String brokerName)
                                            throws ConfigManagerProxyLoggedException
        Asks the IBM Integration API (CMP) to connect to a locally-defined broker with the supplied name. In order for this method to succeed, a broker of the supplied name, and of at least V7.0, must exist and be running on the machine on which the application is running. This method is functionally equivalent to constructing a LocalBrokerConnectionParameters object with the supplied broker name, and passing it to BrokerProxy.getInstance().
        Parameters:
        brokerName - Name of the locally-defined broker to connect to.
        Throws:
        ConfigManagerProxyLoggedException - if a broker of the supplied name could not be found, or if a connection could not be established for whatever reason.
      • getLocalInstance

        public static BrokerProxy getLocalInstance()
                                            throws ConfigManagerProxyLoggedException
        Returns the BrokerProxy object that represents the broker in which the current application is deployed. This method must only be called when the current application is deployed as a JavaCompute node or Java User Defined Node. If the current application is not deployed inside a broker, a ConfigManagerProxyLoggedException is thrown.

        When a IBM Integration API (CMP) application is run inside such an environment, take care when using methods that might affect the message flow in which the IBM Integration API (CMP) application is running; for example, stopping, deleting or redeploying the message flow. As the IBM Integration API (CMP) application can never receive notifications that such operations have successfully completed, their use in such scenarios is not recommended.

        Throws:
        ConfigManagerProxyLoggedException - if the application is not deployed inside a broker.
      • disconnect

        public void disconnect()
        When connected directly to a broker, this method deregisters all listeners registered to this BrokerProxy instance and closes the link to the broker. This makes client APIs unusable. After calling this method, the only way to re-establish the link to the broker is by reissuing the BrokerProxy.getInstance() call.
      • cancelDeployment

        public DeployResult cancelDeployment(long timeToWaitMs)
                                      throws ConfigManagerProxyLoggedException
        Deprecated. This method is not used as of WebSphere Message Broker V7. Cancelling deployment is no longer required. Use AdminQueueEntry.cancel() to cancel a specific unprocessed request on a broker.
        This method returns a DeployResult with a failure completion code.
        Throws:
        ConfigManagerProxyLoggedException
      • cancelDeployment

        public void cancelDeployment()
                              throws ConfigManagerProxyLoggedException
        Deprecated. This method is not used as of WebSphere Message Broker V7. Cancelling deployment is no longer required. Use AdminQueueEntry.cancel() to cancel a specific unprocessed request on a broker.
        This method does nothing.
        Throws:
        ConfigManagerProxyLoggedException
      • createExecutionGroup

        public ExecutionGroupProxy createExecutionGroup(java.lang.String name)
                                                 throws ConfigManagerProxyLoggedException,
                                                        java.lang.IllegalArgumentException
        Asks the broker to create an Execution Group of the supplied name. If an execution group already exists with the supplied name, the existing execution group is returned.

        If synchronous updates have been enabled using BrokerProxy.setSynchronous(), this method will only return an ExecutionGroupProxy object once the execution group has been fully initialized on the broker. If synchronous updates have not been enabled, an object will be returned but it might not yet exist on the target broker at the point of return, and any subsequent operations on that object will only be attempted by the broker if and only if the actual execution group has been fully initialized.

        Parameters:
        name - Name of the new execution group.
        Returns:
        ExecutionGroupProxy an object that represents the new execution group.
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
        java.lang.IllegalArgumentException - if the supplied name is null or the empty string.
      • createExecutionGroup

        public ExecutionGroupProxy createExecutionGroup(java.lang.String name,
                                                        int arch)
                                                 throws ConfigManagerProxyLoggedException
        Deprecated. As of WebSphere Message Broker V7, the arch parameter is ignored. Use createExecutionGroup(String) instead.
        Asks the broker to create an Execution Group of the supplied name. If an execution group already exists with the supplied name, the existing execution group is returned.

        If synchronous updates have been enabled using BrokerProxy.setSynchronous(), this method will only return an ExecutionGroupProxy object once the execution group has been fully initialized on the broker. If synchronous updates have not been enabled, an object will be returned but it might not yet exist on the target broker at the point of return, and any subsequent operations on that object will only be attempted by the broker if and only if the actual execution group has been fully initialized.

        Parameters:
        name - Name of the new execution group.
        arch - Ignored
        Returns:
        ExecutionGroupProxy an object that represents the new execution group.
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • deleteExecutionGroup

        public void deleteExecutionGroup(java.lang.String name)
                                  throws ConfigManagerProxyLoggedException,
                                         ConfigManagerProxyPropertyNotInitializedException,
                                         java.lang.IllegalArgumentException
        Asks the broker to delete the execution group with the supplied name from the broker. Once it has been processed by the broker, if the request is successful any resources used by the execution group will be removed and the execution group will no longer appear in the output of mqsilist for that broker.

        If synchronous updates have been enabled using BrokerProxy.setSynchronous(), this method will only return once the execution group has been fully deleted. Otherwise, the request to delete the execution group will be processed asynchronously and the execution group might still exist when the method returns.

        Parameters:
        name - of the execution group to be deleted from the broker.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because information was not supplied from the broker before a timeout occurred.
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
        java.lang.IllegalArgumentException - if the supplied name is null or the empty String.
      • deleteExecutionGroup

        public DeployResult deleteExecutionGroup(java.lang.String name,
                                                 long timeToWaitMs)
                                          throws ConfigManagerProxyLoggedException,
                                                 ConfigManagerProxyPropertyNotInitializedException
        Deprecated. As of WebSphere Message Broker V7 applications connect directly to brokers, and so deployment of execution group deletions and the resulting DeployResult object are no longer relevant. Use deleteExecutionGroup(String) instead.
        Asks the broker to delete the execution group with the supplied name from the broker. Once it has been processed by the broker, if the request is successful any resources used by the execution group will be removed and the execution group will no longer appear in the output of mqsilist for that broker.

        If synchronous updates have been enabled using BrokerProxy.setSynchronous(), this method will only return once the execution group has been fully deleted. Otherwise, the request to delete the execution group will be processed asynchronously and the execution group might still exist when the method returns.

        Parameters:
        name - of the execution group to be deleted from the broker.
        timeToWaitMs - This parameter is ignored.
        Returns:
        DeployResult The returned value is a dummy DeployResult object with a 'success' return code. This value is returned for compatibility with older applications, and is returned even if the request is rejected by the broker.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because information was not supplied from the broker before a timeout occurred.
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • deleteAllExecutionGroupsAndDeploy

        public void deleteAllExecutionGroupsAndDeploy()
                                               throws ConfigManagerProxyLoggedException
        Deprecated. Use BrokerProxy.deleteExecutionGroup() to delete individual execution groups, or delete the broker to delete all execution groups.
        This method does nothing.
        Throws:
        ConfigManagerProxyLoggedException
      • deploy

        public DeployResult deploy(long timeToWaitMs)
                            throws ConfigManagerProxyLoggedException
        Deprecated. This method is should not be used as of WebSphere Message Broker V7, as configuration changes are sent directly to the broker and applied immediately. Older applications that were using this method to make property changes synchronously should use BrokerProxy.setSynchronous(long) to achieve the same effect.
        This method sends a dummy request to the broker and causes the application to pause until the broker responds.

        Using this method is unnecessary and will cause your application to work more slowly.

        In previous versions of WebSphere Message Broker, this method deployed configuration changes to a broker. This had the effect of pausing the application until the request was completed by the broker, and thus provided the ability to make configuration changes synchronously.

        As of WebSphere Message Broker V7, property changes are applied immediately and so a separate deployment step is not required. Calling BrokerProxy.deploy(long) now sends a dummy request to the broker, and causes the application to pause until the response is received. This achieves largely the same effect as the pre-v7 behavior, but does not guarantee that any previously submitted property change requests have been processed by the time the method returns. However to help ensure consistent behavior, when older applications (i.e. those connected through the deprecated ConfigManagerProxy root object) attempt to modify the broker's configuration the IBM Integration API (CMP) will, by default, pause for up to 60 seconds until the request has been fully processed by the broker. See setSynchronous(int) for more information.

        It is recommended that applications that have a requirement to make property changes synchronously and that currently use BrokerProxy.deploy(long) are changed to use the IBM Integration API (CMP) synchronization framework instead. This means removing any calls to BrokerProxy.deploy(long) and instead calling BrokerProxy.setSynchronous(long) before a property change is made. Alternatively, consider using the AdministeredObjectListener interface to have your application register for object change notifications.

        Parameters:
        timeToWaitMs - Maximum length of time to wait (in milliseconds) for the response message before returning. Use -1 to wait indefinitely.
        Returns:
        A DeployResult object with a 'success' return code.
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. Subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • setQueueManagerName

        public void setQueueManagerName(java.lang.String newQMgr)
                                 throws ConfigManagerProxyLoggedException
        Deprecated. Since the Configuration Manager is no longer used to hold broker connection information, this particular method has been deprecated as of WebSphere Message Broker V7. To change a broker's queue manager you need to delete and recreate the broker.
        This method does nothing.
        Throws:
        ConfigManagerProxyLoggedException
      • getConfigurableServicePropertyNames

        public java.lang.String[] getConfigurableServicePropertyNames()
        Returns a string array of all runtime configurable service properties associated with this object.

        Consider using BrokerProxy.getConfigurableServices(String) to access configurable services and their properties in a more consumable way.

        Each String is of the form "CSType/CSName/PropertyName", where CSType is the type of the configurable service, CSName is the name of the configurable service and PropertyName is the name of the property. The '/' character that separates the two values is defined in AttributeConstants.OBJECT_NAME_DELIMITER.

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

        public ConfigurableService[] getConfigurableServices(java.lang.String type)
                                                      throws ConfigManagerProxyPropertyNotInitializedException,
                                                             java.lang.IllegalArgumentException
        Returns an array of ConfigurableService objects that describes all the configurable services defined on the broker that match the supplied type.

        Any returned objects are not updated by the IBM Integration API (CMP) once they have been returned to the caller. If a configurable service or any of its properties is subsequently modified on the broker, the object will be out of date and this method should be called again.

        Parameters:
        type - Type of the configurable service (e.g. "EISProviders"). If the parameter is null or the empty string, all configurable services are returned.
        Returns:
        ConfigurableService[] the configurable services that matched the supplied criteria.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if information on the broker's configurable services was not supplied before a timeout occurred.
        java.lang.IllegalArgumentException
      • getConfigurableService

        public ConfigurableService getConfigurableService(java.lang.String type,
                                                          java.lang.String name)
                                                   throws ConfigManagerProxyPropertyNotInitializedException
        Returns a ConfigurableService object with the supplied name and type. If a configurable service with the supplied name and type cannot be found, null is returned. Given the supplied type and name criteria, if more than one match exists an arbitrary result is returned.

        Any returned object is not updated by the IBM Integration API (CMP) once it has been returned to the caller. If the configurable service or any of its properties is subsequently modified on the broker, the returned object will be out of date and this method should be called again.

        Parameters:
        type - Type of the configurable service (e.g. "EISProviders"). If this parameter is null or the empty string, all configurable service types are searched.
        name - Name of the configurable service (e.g. "SAP1"). If this parameter is null or the empty string, all configurable service names are searched for the given type. Names are unique on a broker for a given configurable service type.
        Returns:
        ConfigurableService a configurable service that matched the supplied criteria.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if information on the broker's configurable services was not supplied before a timeout occurred.
      • getConfigurableServiceTypes

        public java.lang.String[] getConfigurableServiceTypes()
                                                       throws ConfigManagerProxyPropertyNotInitializedException,
                                                              java.lang.IllegalArgumentException
        Returns a list of all the ConfigurableService types that are known to the broker.
        Returns:
        String[] each element is a unique configurable service type
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if information on the broker's configurable services was not supplied before a timeout occurred.
        java.lang.IllegalArgumentException
      • createConfigurableService

        public void createConfigurableService(java.lang.String csType,
                                              java.lang.String csName)
                                       throws ConfigManagerProxyLoggedException,
                                              java.lang.IllegalArgumentException
        Asks the broker to create a new configurable service of the supplied type and name.
        Parameters:
        csType - Type of the new configurable service (e.g. JMSProviders)
        csName - Name of the new configurable service. The name must be unique on the broker.
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
        java.lang.IllegalArgumentException - if either the supplied name or type is null or the empty String.
      • deleteConfigurableService

        public void deleteConfigurableService(java.lang.String csType,
                                              java.lang.String csName)
                                       throws ConfigManagerProxyLoggedException,
                                              java.lang.IllegalArgumentException
        Asks the broker to delete the configurable service of the supplied type and name.
        Parameters:
        csType - Type of the configurable service (e.g. JMSProviders)
        csName - Name of the configurable service. The name must exist on the broker.
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
        java.lang.IllegalArgumentException - if either the supplied name or type is null or the empty String.
      • getHTTPListenerPropertyNames

        public java.lang.String[] getHTTPListenerPropertyNames()
        Returns a string array of all runtime HTTPListener properties associated with this object. Use getHTTPListenerProperty() to get the current value associated with a given property and setHTTPListenerProperty() 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 AttributeConstants.OBJECT_NAME_DELIMITER.
        Returns:
        String[] containing HTTPListener property names that have been defined on the broker
      • getRuntimePropertyNames

        public java.lang.String[] getRuntimePropertyNames()
        Deprecated. This method is not used as of WebSphere Message Broker V7. No runtime properties are returned.
        Returns an empty array.
      • getRegistryPropertyNames

        public java.lang.String[] getRegistryPropertyNames()
        Returns a string array of all registry properties associated with this object. Use getRegistryProperty() to get the current value associated with a given property and setRegistryProperty() to set it. Each String is derived from a constant beginning AttributeConstants.BROKER_REGISTRY.
        Returns:
        String[] containing broker registry names that have been defined on the broker.
      • getSecurityCachePropertyNames

        public java.lang.String[] getSecurityCachePropertyNames()
        Returns a string array of all security cache properties associated with this object. Use getSecurityCacheProperty() to get the current value associated with a given property and setSecurityCacheProperty() to set it. Each String is derived from a constant beginning AttributeConstants.BROKER_SECURITYCACHE.
        Returns:
        String[] containing security cache property names that have been defined on the broker.
      • getExecutionGroups

        public java.util.Enumeration<ExecutionGroupProxy> getExecutionGroups(java.util.Properties props)
                                                                      throws ConfigManagerProxyPropertyNotInitializedException

        Returns an enumeration of all the ExecutionGroupProxy objects that match the filter specified by the Properties argument.

        Parameters:
        props - Filter to select the ExecutionGroupProxy 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 execution groups of this broker.
        Returns:
        Enumeration The ExecutionGroupProxy objects that matched the supplied filter.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
      • getExecutionGroup

        public ExecutionGroupProxy getExecutionGroup(java.util.Properties props)
                                              throws ConfigManagerProxyPropertyNotInitializedException

        Returns the first ExecutiongroupProxy object that matches the filter specified by the Properties argument. This method is an ExecutionGroupProxy-specific wrapper to AdministeredObject.getManagedSubcomponent(Properties). Consider using getExecutionGroupByName(String) to return a execution group by name.

        Parameters:
        props - Filter to select the ExecutionGroupProxy 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 execution groups of this broker.
        Returns:
        ExecutionGroupProxy The first object that matched the supplied filter, or null if nothing matched the filter.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
        See Also:
        AdministeredObject.getManagedSubcomponent(Properties)
      • getExecutionGroupByName

        public ExecutionGroupProxy getExecutionGroupByName(java.lang.String executionGroupName)
                                                    throws ConfigManagerProxyPropertyNotInitializedException
        Returns the ExecutionGroupProxy object with the supplied name, or null if an execution group of that name does not exist or if the supplied argument was null.
        Parameters:
        executionGroupName - Name of the execution group
        Returns:
        ExecutionGroupProxy object representing the requested execution group.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
      • startMessageFlows

        public void startMessageFlows()
                               throws ConfigManagerProxyLoggedException,
                                      ConfigManagerProxyPropertyNotInitializedException
        Asks the broker to start all message flows that exist on the broker. This method simply invokes the startMessageFlows() method for each ExecutionGroupProxy object logically owned by this BrokerProxy. As such, response notifications will be sent to AdministeredObjectListeners of the ExecutionGroupProxy objects and not the BrokerProxy.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • stopMessageFlows

        public void stopMessageFlows(boolean immediate)
                              throws ConfigManagerProxyLoggedException,
                                     ConfigManagerProxyPropertyNotInitializedException
        Deprecated. The immediate flag is ignored. Use stopMessageFlows() instead.
        Asks the broker to stop all message flows that exist on the broker. This method simply invokes the stopMessageFlows() method for each ExecutionGroupProxy object logically owned by this BrokerProxy. As such, response notifications will be sent to AdministeredObjectListeners of the ExecutionGroupProxy objects and not the BrokerProxy.
        Parameters:
        immediate - Not used
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if information on the broker's execution groups is not available.
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • stopMessageFlows

        public void stopMessageFlows()
                              throws ConfigManagerProxyLoggedException,
                                     ConfigManagerProxyPropertyNotInitializedException
        Asks the broker to stop all message flows that exist on the broker. This method simply invokes the stopMessageFlows() method for each ExecutionGroupProxy object logically owned by this BrokerProxy. As such, response notifications will be sent to AdministeredObjectListeners of the ExecutionGroupProxy objects and not the BrokerProxy.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • setUserTrace

        public void setUserTrace(MessageFlowProxy.UserTrace newTrace)
                          throws ConfigManagerProxyLoggedException,
                                 ConfigManagerProxyPropertyNotInitializedException
        Iterates through every deployed message flow in every execution group, configuring its user trace settings.
        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:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker or if the current user is not authorized to view the list of execution groups on this broker, or to view the list of message flows on any execution group. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • setUUID

        public void setUUID(java.lang.String newUUID)
                     throws ConfigManagerProxyLoggedException,
                            java.lang.IllegalArgumentException
        Deprecated. This method is unique to Configuration Manager connections, and as such is no longer used as of WebSphere Message Broker V7.
        This method throws an IllegalArgumentException.
        Throws:
        ConfigManagerProxyLoggedException
        java.lang.IllegalArgumentException
      • 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*() methods. For example, broker1.getManagedSubcomponent(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.getExecutionGroup(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.
      • getLastDiscoveryTime

        public java.util.Date getLastDiscoveryTime(BrokerProxy.SyncType syncType)
        Deprecated. This method is unique to Configuration Manager connections, and as such is no longer used as of WebSphere Message Broker V7.
        Returns a new Date object initialised to the current date and time.
      • setName

        public void setName(java.lang.String name)
                     throws ConfigManagerProxyLoggedException
        This method overrides the base class implementation, so that an exception is thrown if this method is invoked against this class. It is not possible to change the name of the broker. The name is defined when the broker is created and cannot be changed afterwards.
        Overrides:
        setName in class AdministeredObject
        Parameters:
        name - (this is ignored)
        Throws:
        ConfigManagerProxyLoggedException - to indicate this method should not be called.
      • getAccessControlEntries

        public AccessControlEntry[] getAccessControlEntries()
        Deprecated. This method is unique to Configuration Manager connections, and as such is no longer used as of WebSphere Message Broker V7.
        This method returns an array with no elements.
      • createSubscriptionQuery

        public SubscriptionQuery createSubscriptionQuery()
        Deprecated. This method is not used as of WebSphere Message Broker V7. The effects of invoking it are no longer defined.
      • setRuntimeProperty

        public void setRuntimeProperty(java.lang.String objectAndPropertyName,
                                       java.lang.String propertyValue)
                                throws ConfigManagerProxyLoggedException,
                                       java.lang.IllegalArgumentException
        Deprecated. This method is not used as of WebSphere Message Broker V7.
        This method does nothing.
        Throws:
        ConfigManagerProxyLoggedException
        java.lang.IllegalArgumentException
      • setConfigurableServiceProperty

        public void setConfigurableServiceProperty(java.lang.String serviceObjectAndPropertyName,
                                                   java.lang.String propertyValue)
                                            throws ConfigManagerProxyLoggedException,
                                                   java.lang.IllegalArgumentException
        Asks the broker to configure an arbitrary broker-wide configurable service property.

        Consider using ConfigurableService.setProperty() to set configurable service properties in a more consumable way.

        The set of properties configurable using this method are those that can be manipulated using the mqsichangeproperties command that has the -c flag specified.

        To set runtime properties that affect an execution group, use ExecutionGroupProxy.setRuntimeProperty(). To set runtime properties that affect the HTTP listener, use BrokerProxy.setHTTPListenerProperty(). To set runtime properties that affect the broker's registry, use BrokerProxy.setRegistryProperty(). To set runtime properties that affect the security cache, use BrokerProxy.setSecurityCacheProperty(). To set other runtime properties, use BrokerProxy.setRuntimeProperty().

        Constants exist for many common property names in the AttributeConstants interface, and you should use these wherever possible. To set properties that are not defined in this interface, the serviceObjectAndPropertyName parameter can also be made up of a String of the form "ConfigurableServiceName/ObjectName/PropertyName", where ConfigurableServiceName, ObjectName and PropertyName are the configurable service, object and property names supplied on the -c, -o and -n parameters respectively of mqsichangeproperties. For example, "JDBCProviders/DB2/account" would request a change to the 'JDBCProviders' service, 'DB2' object, 'account' property. The '/' separator is defined as AttributeConstants.OBJECT_NAME_DELIMITER.

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

        Parameters:
        serviceObjectAndPropertyName - The complete 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 broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
        java.lang.IllegalArgumentException - if serviceObjectAndPropertyName is not a valid syntax.
      • setRegistryProperty

        public void setRegistryProperty(java.lang.String objectAndPropertyName,
                                        java.lang.String propertyValue)
                                 throws ConfigManagerProxyLoggedException,
                                        java.lang.IllegalArgumentException
        Asks the broker to configure an arbitrary broker-wide registry property.
        Parameters:
        objectAndPropertyName - The name of the property being manipulated. Used the constants beginning AttributeConstants.BROKER_REGISTRY or return values from getRegistryPropertyNames().
        propertyValue - The new value to associate with the property
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
        java.lang.IllegalArgumentException - if objectAndPropertyName is not a valid syntax.
      • setSecurityCacheProperty

        public void setSecurityCacheProperty(java.lang.String objectAndPropertyName,
                                             java.lang.String propertyValue)
                                      throws ConfigManagerProxyLoggedException,
                                             java.lang.IllegalArgumentException
        Asks the broker to configure an arbitrary broker-wide security cache property. The set of properties configurable using this method are those that can be manipulated using the mqsichangeproperties command that does not have the -e -b or -c flags specified.

        To set runtime properties that affect an execution group, use ExecutionGroupProxy.setRuntimeProperty(). To set runtime properties that affect the HTTP listener, use BrokerProxy.setHTTPListenerProperty(). To set runtime properties that affect the broker's registry, use BrokerProxy.setRegistryProperty(). To set runtime properties that affect the security cache, use BrokerProxy.setSecurityCacheProperty(). To set runtime properties for a configurable service, use BrokerProxy.setConfigurableServiceProperty().

        Constants exist for many common objectAndPropertyName values in the AttributeConstants 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. The '/' separator is defined as AttributeConstants.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 broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
        java.lang.IllegalArgumentException - if objectAndPropertyName is not a valid syntax.
      • setHTTPListenerProperty

        public void setHTTPListenerProperty(java.lang.String objectAndPropertyName,
                                            java.lang.String propertyValue)
                                     throws ConfigManagerProxyLoggedException,
                                            java.lang.IllegalArgumentException
        Asks the broker to configure an arbitrary property on the broker's HTTP listener component. The set of properties configurable using this method are those that can be manipulated using the mqsichangeproperties command that has the -b flag specified.

        To set runtime properties that affect an execution group, use ExecutionGroupProxy.setRuntimeProperty(). To set runtime properties that affect a configurable service, use BrokerProxy.setConfigurableServiceProperty(). To set other runtime properties, use BrokerProxy.setRuntimeProperty().

        Constants exist for many common objectAndPropertyName values in the AttributeConstants 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, "HTTPSConnector/port" would request a change to the HTTPS port property. The '/' separator is defined as AttributeConstants.OBJECT_NAME_DELIMITER.

        The list of currently defined property names can be obtained using the method getHTTPListenerPropertyNames(). 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 broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
        java.lang.IllegalArgumentException - if objectAndPropertyName is not a valid syntax.
      • getRuntimeProperty

        public java.lang.String getRuntimeProperty(java.lang.String objectAndPropertyName)
                                            throws ConfigManagerProxyPropertyNotInitializedException,
                                                   java.lang.IllegalArgumentException
        Deprecated. This method is not used as of WebSphere Message Broker V7, and there are several methods that should be used instead; for example, use BrokerProxy.getRegistryProperty() to get broker registry properties, BrokerProxy.getConfigurableServiceProperty() to get configurable service properties and ExecutionGroupProxy.getRuntimeProperty() to get execution group runtime properties.
        This method returns null.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException
        java.lang.IllegalArgumentException
      • getConfigurableServiceProperty

        public java.lang.String getConfigurableServiceProperty(java.lang.String serviceObjectAndPropertyName)
                                                        throws ConfigManagerProxyPropertyNotInitializedException,
                                                               java.lang.IllegalArgumentException
        Returns the value of the configurable service runtime property with the supplied name. The set of properties discoverable in this way are those reported by the getConfigurableServicePropertyNames() method.

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

        Parameters:
        serviceObjectAndPropertyName - The complete 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 value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
        java.lang.IllegalArgumentException - if serviceObjectAndPropertyName is not a valid syntax.
      • getRegistryProperty

        public java.lang.String getRegistryProperty(java.lang.String objectAndPropertyName)
                                             throws ConfigManagerProxyPropertyNotInitializedException,
                                                    java.lang.IllegalArgumentException
        Returns the value of the registry property with the supplied name. The set of property names discoverable in this way are those reported by the getRegistryPropertyNames() method.

        If you wish to directly look up a specific named property, use constants defined in the AttributeConstants interface.

        Parameters:
        objectAndPropertyName - The name of the property whose value is to be reported The format of this String is the same as the format returned by getRegistryPropertyNames().
        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 value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
        java.lang.IllegalArgumentException - if objectAndPropertyName is not a valid syntax.
      • isAdminSecurityEnabled

        public boolean isAdminSecurityEnabled()
                                       throws ConfigManagerProxyPropertyNotInitializedException
        Returns true only if administrative security has been enabled on the broker.
        Returns:
        boolean true if IBM Integration API (CMP) actions are subject to administrative security checking.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
      • getSecurityCacheProperty

        public java.lang.String getSecurityCacheProperty(java.lang.String objectAndPropertyName)
                                                  throws ConfigManagerProxyPropertyNotInitializedException,
                                                         java.lang.IllegalArgumentException
        Returns the value of the security cache property with the supplied name. The set of properties discoverable in this way are those reported by the getSecurityCachePropertyNames() method.

        If you wish to directly look up a specific named property, use constants defined in the AttributeConstants 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 AttributeConstants.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 value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
        java.lang.IllegalArgumentException - if objectAndPropertyName is not a valid syntax.
      • getHTTPListenerProperty

        public java.lang.String getHTTPListenerProperty(java.lang.String objectAndPropertyName)
                                                 throws ConfigManagerProxyPropertyNotInitializedException,
                                                        java.lang.IllegalArgumentException
        Returns the value of the HTTP listener runtime property with the supplied name. The set of properties discoverable in this way are those reported by the getHTTPListenerPropertyNames() method.

        If you wish to directly look up a specific named property, use constants defined in the AttributeConstants 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 AttributeConstants.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 value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
        java.lang.IllegalArgumentException - if objectAndPropertyName is not a valid syntax.
      • setPolicySet

        public void setPolicySet(BrokerProxy.PolicyType policyType,
                                 java.lang.String policySet,
                                 java.io.InputStream policySetContents)
                          throws ConfigManagerProxyLoggedException,
                                 java.io.IOException,
                                 java.lang.IllegalArgumentException
        Asks the broker to save a policy set with the supplied contents. If the name is identical to an existing policy set on the broker, the contents of the existing policy set will be overwritten with the contents of the supplied policy set. An empty or null InputStream has the effect of deleting the policy set of the supplied name.

        This is a convenience method for a specific invocation of the BrokerProxy.setRuntimeProperty() method.

        Parameters:
        policyType - Type of the file to retrieve from the policy set. Currently, only PolicyType.WS_SECURITY is supported.
        policySet - Name of the policy set
        policySetContents - An InputStream containing the contents of the policy set XML file.
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
        java.io.IOException - if policySetContents is invalid
        java.lang.IllegalArgumentException - if policySet is not a valid syntax.
      • setPolicySetBindings

        public void setPolicySetBindings(BrokerProxy.PolicyType policyType,
                                         java.lang.String policySetBindings,
                                         java.io.InputStream policySetBindingsContent)
                                  throws ConfigManagerProxyLoggedException,
                                         java.io.IOException,
                                         java.lang.IllegalArgumentException
        Asks the broker to save policy set binding information with the supplied contents. If the name is identical to an existing policy set binding on the broker, the contents of the existing policy set binding will be overwritten with the contents of the supplied policy set binding. An empty or null InputStream has the effect of deleting the policy set binding of the supplied name.

        This is a convenience method for a specific invocation of the BrokerProxy.setRuntimeProperty() method.

        Parameters:
        policyType - Type of the file to retrieve from the policy set. Currently, only PolicyType.WS_SECURITY is supported.
        policySetBindings - Name of the policy set binding
        policySetBindingsContent - An InputStream containing the contents of the policy set binding file.
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
        java.io.IOException - if policySetBindingContents is invalid
        java.lang.IllegalArgumentException - if policySetBindings is not a valid syntax.
      • getPolicySet

        public java.io.InputStream getPolicySet(BrokerProxy.PolicyType policyType,
                                                java.lang.String policySetName)
                                         throws ConfigManagerProxyPropertyNotInitializedException,
                                                java.lang.IllegalArgumentException
        Asks the broker to return the contents of a policy set with the supplied name. If the returned InputStream is empty, either there is no policy set of the supplied name or a PolicyType of something other than PolicyType.WS_SECURITY was supplied. Use BrokerProxy.getPolicySetNames() to discover the list of valid policy set names.
        Parameters:
        policyType - Type of the file to retrieve from the policy set. Currently, only PolicyType.WS_SECURITY and PolicyType.WS_RM are supported.
        policySetName - Name of the policy set
        Returns:
        InputStream the contents of the policy set of the supplied name.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
        java.lang.IllegalArgumentException - if policySetName is not a valid syntax.
      • getPolicySetBindings

        public java.io.InputStream getPolicySetBindings(BrokerProxy.PolicyType policyType,
                                                        java.lang.String policySetBindingsName)
                                                 throws ConfigManagerProxyPropertyNotInitializedException,
                                                        java.lang.IllegalArgumentException
        Asks the broker to return the contents of a policy set bindings with the supplied name. If the returned InputStream is empty, either there is no policy set bindings of the supplied name or a PolicyType of something other than PolicyType.WS_SECURITY was supplied. Use BrokerProxy.getPolicySetBindingsNames() to discover the list of valid policy set bindings names.
        Parameters:
        policyType - Type of the file to retrieve from the policy set. Currently, only PolicyType.WS_SECURITY is supported.
        policySetBindingsName - Name of the policy set bindings
        Returns:
        InputStream the contents of the policy set of the supplied name
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
        java.lang.IllegalArgumentException - if policySetBindingsName is not a valid syntax.
      • getPolicySetNames

        public java.lang.String[] getPolicySetNames()
                                             throws ConfigManagerProxyPropertyNotInitializedException
        Asks the broker to return the names of the policy sets defined on the broker. This might not be the same as the set of policy set names that are associated with active message flows (as returned by the ExecutionGroupProxy.getPolicySetNames() and MessageFlowProxy.getPolicySetNames() methods).
        Returns:
        String[] the names of the defined policy sets
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
      • getPolicySetBindingsNames

        public java.lang.String[] getPolicySetBindingsNames()
                                                     throws ConfigManagerProxyPropertyNotInitializedException
        Asks the broker to return the names of the policy set bindings that have been defined on the broker. This might not be the same as the set of policy set bindings that are associated with active message flows (as returned by the ExecutionGroupProxy.getPolicySetBindingsNames() and MessageFlowProxy.getPolicySetBindingsNames() methods).
        Returns:
        String[] names of the defined policy set bindings
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
      • getPolicyManager

        public PolicyManagerProxy getPolicyManager(java.lang.String policyType)
                                            throws ConfigManagerProxyLoggedException
        Asks the broker to get a policy manager for a given type of policy. It is recommended to set setSynchronous to a timeout value on the broker proxy when using this method.
        Returns:
        PolicyManagerProxy a PolicyManagerProxy object that reflects all the policies of a given type.
        Throws:
        ConfigManagerProxyLoggedException - if the value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
        ConfigManagerProxyLoggedException - if there is an error getting the PolicyManagerProxy.
      • getPolicyTypes

        public java.lang.String[] getPolicyTypes()
        Asks the broker for a list of all valid policy types. It is recommended to set setSynchronous to a timeout value on the broker proxy when using this method.
        Returns:
        String[] an array containing the names of all policies types supported by the broker. null will be returned if there were any errors retrieving the policy types.
      • getQueues

        public java.lang.String[] getQueues()
                                     throws ConfigManagerProxyPropertyNotInitializedException
        Returns a list of the MQ queues referenced by the message flows in use by this broker. Only queues directly referenced by the following nodes are reported:
        • MQInput
        • MQOutput
        • MQGet
        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 ExecutionGroupProxy.getQueues() method for each execution group that is currently active on the broker.

        Returns:
        String[] the names of the queues that were specified during deployment
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
      • getNodeTypes

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

        This method works by aggregating the responses from calling the ExecutionGroupProxy.getNodeTypes() method for each execution group that is currently active on the broker.

        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 broker.
      • getOperationMode

        public java.lang.String getOperationMode()
                                          throws ConfigManagerProxyPropertyNotInitializedException
        Returns the logical mode of operation in which the broker is currently running. If the OperationMode registry property has not been set on the broker, this method will derive a default assumed mode of operation and return that value instead.
        Returns:
        String Operation mode of the broker, which can be any one of the constants beginning AttributeConstants.OPERATIONMODE_.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
      • getOperationModeValidity

        public boolean getOperationModeValidity()
        Returns a boolean value that indicates whether the set of the artefacts deployed to the current broker are valid given the mode of operation in which the broker is running. A return value of true means that the operation mode is acceptable for the set of resources that is deployed. A return value of false means that there is at least one deployed resource that is not valid for the current operation mode, and steps should be taken to correct the situation. Use the mqsimode command to determine instances of license violations, if any.
        Returns:
        boolean true if the license mode is valid, false if it is not valid.
      • getOperationModeViolations

        public java.util.List<LogEntry> getOperationModeViolations()
        Goes through the artefacts deployed on the supplied broker and returns a list of LogEntry messages that describe each violation of the broker, based on the current value of the OperationMode parameter. If the supplied list is empty, no violations were found.
        Returns:
        List of LogEntry objects, with each entry corresponding to a single violation of the broker's operating mode..
      • getModesOfOperation

        public java.lang.String[] getModesOfOperation()
        Returns the modes of operation which are available on the broker.
        Returns:
        String[] Available operation modes of the broker, which can be any one of the constants beginning AttributeConstants.OPERATIONMODE_.
      • enableAdministrationAPITracing

        public static void enableAdministrationAPITracing(java.lang.String filename)
                                                   throws ConfigManagerProxyLoggedException
        Enables service tracing of the IBM Integration API (CMP), sending output to the file with the supplied name. Enabling service trace will cause the IBM Integration API (CMP) to work more slowly than usual.

        An alternative way of tracing the IBM Integration API (CMP) is to set the environment variable 'MQSI_CMP_TRACE' to the value of the file name to which trace will be directed, for example:

        set MQSI_CMP_TRACE=c:\trace.txt
        This approach does not require you to recompile your application. This environment variable is discovered and acted upon when a BrokerProxy object is first connected (using BrokerProxy.getInstance() or one of its variants), which means that any methods that are called before a BrokerProxy handle is first obtained will not be traced. If the environment variable is set and the trace file could not be written at the time the BrokerProxy.getInstance() method is called, that method will throw a ConfigManagerProxyLoggedException.
        Parameters:
        filename - File spec of the output file, which cannot be null.
        Throws:
        ConfigManagerProxyLoggedException - if the logger could not be instantiated.
      • disableAdministrationAPITracing

        public static void disableAdministrationAPITracing()
        Stops service tracing of the IBM Integration API (CMP). This method will cause any IBM Integration API (CMP) trace file to be closed, if one had previously been opened using either enableAdministrationAPITracing() or the environment variable MQSI_CMP_TRACE.
      • setRetryCharacteristics

        public static void setRetryCharacteristics(long maxWaitTimeMs)
        Sets the retry characteristics for all broker connections originating from this JVM instance.

        The IBM Integration API (CMP) 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 broker). This can happen if the API has a slow link to the broker, or if the broker is heavily burdened or just not running.

        Parameters:
        maxWaitTimeMs - the maximum length of time the IBM Integration API (CMP) will 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.
      • getResourceTypeNames

        public java.lang.String[] getResourceTypeNames()
                                                throws ConfigManagerProxyPropertyNotInitializedException
        Returns a String array of all resource types available on the broker that have the ability to emit resource-level statistics.
        Returns:
        String[] each element is a resource type name on which statistics can be enabled.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the list could not be determined because the information was not supplied from the broker before a timeout occurred.
      • setCacheManagerProperty

        public void setCacheManagerProperty(java.lang.String objectAndPropertyName,
                                            java.lang.String propertyValue)
                                     throws ConfigManagerProxyLoggedException,
                                            java.lang.IllegalArgumentException
        Asks the broker to configure an arbitrary property on the broker's CacheManager component. The set of properties configurable using this method are those that can be manipulated using the mqsichangeproperties command that has the -b flag specified.

        To set runtime properties that affect an execution group, use ExecutionGroupProxy.setRuntimeProperty(). To set runtime properties that affect a configurable service, use BrokerProxy.setConfigurableServiceProperty(). To set other runtime properties, use BrokerProxy.setRuntimeProperty().

        Constants exist for many common objectAndPropertyName values in the AttributeConstants 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, "CacheManager/policy" would request a change to the Cache policy value. The '/' separator is defined as AttributeConstants.OBJECT_NAME_DELIMITER.

        The list of currently defined property names can be obtained using the method getCacheManagerPropertyNames(). 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 broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
        java.lang.IllegalArgumentException - if objectAndPropertyName is not a valid syntax.
      • getCacheManagerProperty

        public java.lang.String getCacheManagerProperty(java.lang.String objectAndPropertyName)
                                                 throws ConfigManagerProxyPropertyNotInitializedException,
                                                        java.lang.IllegalArgumentException
        Returns the value of the CacheManager broker level runtime property with the supplied name. The set of properties discoverable in this way are those reported by the getCacheManagerPropertyNames() method.

        If you wish to directly look up a specific named property, use constants defined in the AttributeConstants 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 AttributeConstants.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 value of the parameter could not be determined because the information was not supplied from the broker before a timeout occurred.
        java.lang.IllegalArgumentException - if objectAndPropertyName is not a valid syntax.
      • getCacheManagerPropertyNames

        public java.lang.String[] getCacheManagerPropertyNames()
        Returns a string array of all broker level CacheManager properties associated with this object. Use getCacheManagerProperty() to get the current value associated with a given property and setCacheManagerProperty() 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 AttributeConstants.OBJECT_NAME_DELIMITER.
        Returns:
        String[] containing CacheManager property names that have been defined on the broker
      • convertHexStringToBytes

        public static byte[] convertHexStringToBytes(java.lang.String hex)
      • generateWASPlugin

        public static java.lang.String generateWASPlugin(java.util.Map<BrokerProxy,java.lang.String[]> brokerHostsMap,
                                                         long timeOutMillis)
                                                  throws ConfigManagerProxyLoggedException
        This method generates a String representation of a configuration used for the WAS plugin
        Parameters:
        brokerHostsMap - Map of BrokerProxys to Host Names
        Returns:
        WAS Plugin configuration
        Throws:
        ConfigManagerProxyLoggedException
      • generateModProxyPlugin

        public static java.lang.String generateModProxyPlugin(java.util.Map<BrokerProxy,java.lang.String[]> brokerHostsMap,
                                                              long timeOutMillis)
                                                       throws ConfigManagerProxyLoggedException
        This method generates a String representation of a configuration used for mod_proxy
        Parameters:
        brokerHostsMap - Map of BrokerProxys to Host Names
        Returns:
        mod_proxy configuration
        Throws:
        ConfigManagerProxyLoggedException
      • getSecurityIdentitiesByType

        public java.util.List<SecurityIdentity> getSecurityIdentitiesByType(SecurityIdentity.Type searchType)
                                                                     throws ConfigManagerProxyPropertyNotInitializedException
        Get a list of all of the security identities defined on this integration node that can be used to authenticate with a resource of the specified type (for example, ODBC, JDBC, JMS, etc.). A security identity can be defined on an integration node by using the mqsisetdbparms command.
        Parameters:
        searchType - the type of security identity to return.
        Returns:
        a list of all of the security identities defined on this integration node.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException
      • setDataCapturePolicyUri

        public void setDataCapturePolicyUri(java.lang.String dataCapturePolicyUri)
                                     throws ConfigManagerProxyLoggedException
        Set the data capture policy URI on this broker.
        Parameters:
        dataCapturePolicyUri - the URI of the data capture policy to set on this broker.
        Throws:
        ConfigManagerProxyLoggedException - if a connection could not be established for whatever reason.