com.ibm.broker.config.proxy

Class ResourceManagerProxy



  • public class ResourceManagerProxy
    extends AdministeredObject

    Each ResourceManagerProxy instance represents a component of the execution group that is responsible for interacting with a specific protocol or endpoint type. Examples include the JMS and CICS resource managers. Each instance can report on the capabilities supported by the resource manager, such as whether activity logging is available.

    In order to use ResourceManagerProxy objects, applications must first obtain handles to them. Here is an example of how to do this:

         BrokerProxy b = BrokerProxy.getInstance(
             new IntegrationNodeConnectionParameters("localhost", 4414)); 
         ExecutionGroupProxy e = b.getExecutionGroupByName("default");
         ResourceManagerProxy rmp = e.getResourceManagerByName("CICS");
     

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

    Responsibilities Describes a resource manager and its supported capabilities.
    Internal Collaborators None
    
     Change Activity:
     -------- ----------- -------------   ------------------------------------
     Reason:  Date:       Originator:     Comments:
     -------- ----------- -------------   ------------------------------------
     80006    2011-07-18  HOSIE           V8 release (initial creation)
      3779    2012-05-08  HDCAB            - Added run-time property support
    
     
    • Method Detail

      • getConfigurationObjectTypeOfParent

        public ConfigurationObjectType getConfigurationObjectTypeOfParent()
        Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type. For example, for ExecutionGroupProxy, ConfigurationObjectType.broker is returned.
        Specified by:
        getConfigurationObjectTypeOfParent in class AdministeredObject
        Returns:
        ConfigurationObjectType associated with this class.
      • execute

        public AdminQueueEntry execute(java.lang.String action,
                                       java.util.Properties actionParameters,
                                       java.lang.String objectName,
                                       java.util.Properties objectProperties)
                                throws ConfigManagerProxyLoggedException
        Asks the broker to execute an action against this resource manager.
        Parameters:
        action - the action to execute
        actionParameters - parameters to apply to the action
        objectName - optional objectName to which to apply the action.
        objectProperties - properties that are applied to the object
        Returns:
        AdminQueueEntry that contains the progress/results of the action.
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker, or (only if synchronous updates have been enabled) the request was not successfully processed by the broker.
        ConfigManagerProxyRequestTimeoutException - if synchronous updates have been enabled and a response was not received by the broker before a timeout occurred. (Note that this exception type extends ConfigManagerProxyLoggedException).
        ConfigManagerProxyRequestFailureException - if synchronous updates have been enabled and the request was rejected by the broker. (Note that this exception type extends ConfigManagerProxyLoggedException).
      • setRuntimeProperty

        public void setRuntimeProperty(java.lang.String objectAndPropertyName,
                                       java.lang.String propertyValue)
                                throws ConfigManagerProxyLoggedException,
                                       java.lang.IllegalArgumentException
        Asks the broker to configure an arbitrary resource manager property. The set of properties configurable using this method are those available in the getRuntimePropertyNames() method.

        Constants exist for many common objectAndPropertyName values in the AttributeConstants interface, and you should use these wherever possible.

        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 of a valid syntax.
      • 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 AttributeConstants.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,
                                                   java.lang.IllegalArgumentException
        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 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 property 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.