com.ibm.broker.config.proxy

Class FlowProxy

  • All Implemented Interfaces:
    DeployableObject, DeployedObject
    Direct Known Subclasses:
    MessageFlowProxy, SubFlowProxy


    public class FlowProxy
    extends AdministeredObject
    implements DeployedObject

    This is the superclass from which message flows and subflows inherit.

    The class provides a set of methods common to all these types, such as the setting and getting of common attributes and the ability to access node and connection details.

    com.ibm.broker.config.proxy.FlowProxy extends com.ibm.broker.config.proxy.AdministeredObject implements com.ibm.broker.config.proxy.DeployedObject

    Responsibilities Represents the state of a message flow or subflow that has been deployed to an integration server.
    Internal Collaborators None
    
     Change Activity:
     -------- ----------- -------------   ------------------------------------
     Reason:  Date:       Originator:     Comments:
     -------- ----------- -------------   ------------------------------------
              2014-06-16  HDCAB           v10000 Release
     
    • Method Detail

      • getFileExtension

        public java.lang.String getFileExtension()
        Returns the file extension relevant to flows, not preceded by a '.' character. We check whether the flow was deployed as source and use the relevant extension.
        Specified by:
        getFileExtension in interface DeployableObject
        Returns:
        String file extension
        See Also:
        DeployableObject.getFileExtension()
      • fullNameMatches

        public boolean fullNameMatches(java.lang.String fileName)
                                throws ConfigManagerProxyPropertyNotInitializedException
        Tests if the name of this deployed object matches the fileName passed in. This method returns true if the deployed object name matches either with the source extension or the compiled resource extension
        Specified by:
        fullNameMatches in interface DeployedObject
        Returns:
        boolean true if the fileName matches the deployed resource name
        Throws:
        ConfigManagerProxyPropertyNotInitializedException - if the parent object is not immediately available and has to be requested from the broker, but the request could not be sent to the broker.
      • getModifyTime

        public java.util.Date getModifyTime()
        Returns the time that the current flow was last modified, according to the file modification associated with the cmf file in the broker archive.
        Specified by:
        getModifyTime in interface DeployableObject
        Returns:
        Date the time of the last modification.
        See Also:
        DeployableObject.getModifyTime()
      • getDeployTime

        public java.util.Date getDeployTime()
        Returns the time that the current flow was last deployed to the integration server.
        Specified by:
        getDeployTime in interface DeployedObject
        Returns:
        Date the time of the most recent deployment.
      • getDeployProperties

        public java.util.Properties getDeployProperties()
                                                 throws ConfigManagerProxyPropertyNotInitializedException
        Returns a list of the properties associated with the deployment of this flow.

        This method will pause until the object has received at least one update from the broker. If an update is not received before the timeout specified in BrokerProxy.setRetryCharacteristics() is reached, AdministeredObject.hasBeenPopulatedByBroker() will return false and the returned Properties object will be null.

        Specified by:
        getDeployProperties in interface DeployedObject
        Returns:
        Properties where each key is a deploy related property with its associated value. Keywords are not returned as part of the returned properties. Returns null if no deploy related properties are found.
        Throws:
        ConfigManagerProxyPropertyNotInitializedException
      • getBARFileName

        public java.lang.String getBARFileName()
                                        throws ConfigManagerProxyPropertyNotInitializedException
        Returns the name of the BAR file that was used to deploy the flow to the integration server. This method will return null if the BAR file was deployed by specifying an InputStream parameter to ExecutionGroupProxy.deploy() and a valid BAR file label was not supplied.
        Specified by:
        getBARFileName in interface DeployedObject
        Returns:
        String name of the BAR file that deployed the flow
        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()
                                              throws ConfigManagerProxyLoggedException
        Returns a reference to the integration server on which this flow was deployed. If the flow is deployed to an Application or Library, this method will return the ExecutionGroupProxy parent. This method is different to getParent() which will return an AdministeredObject that is either an ExecutionGroupProxy, ApplicationProxy, RestApiProxy, or LibraryProxy object.
        Specified by:
        getExecutionGroup in interface DeployedObject
        Returns:
        ExecutionGroup
        Throws:
        ConfigManagerProxyLoggedException - if the parent object is not immediately available and has to be requested from the broker, but the request could not be sent to the broker.
        See Also:
        DeployedObject.getExecutionGroup()
      • getRuntimePropertyNames

        public java.lang.String[] getRuntimePropertyNames()
        Returns a string array of the basic runtime 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. The '/' character that separates the two values is defined in AttributeConstants.OBJECT_NAME_DELIMITER.

        Only properties that have explicitly been set on the flow will be returned by this method. Properties that have default values might not be returned, although it might still be possible to set their values using MessageFlowProxy.setRuntimeProperty(), for example, "This/StatsArchivalOn". This is a change in behavior over versions earlier than WebSphere Message Broker V7.

        Returns:
        String[] containing runtime property names that have been defined on the broker
      • setRuntimeProperties

        public void setRuntimeProperties(java.util.Properties props)
                                  throws ConfigManagerProxyLoggedException,
                                         java.lang.IllegalArgumentException
        Asks the broker to configure an arbitrary set of flow properties. Changes are applied immediately.

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

        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, "DynamicSubscriptionEngine/userTraceLevel" would request a change to the integration server's user trace level property. 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:
        props - A set of properties to set on all flows owned by the library. The key is the complete object and property name of the property being manipulated, for example "This/StatsSnapPublicationOn". The value is the new value to associate with the property, for example "active".
        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
        Returns the value of the runtime property with the supplied name.

        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.

        Only properties that have explicitly been set on the flow will be returned by this method. Properties that have default values might yield a null return value from this method, although it might still be possible to set a value using MessageFlowProxy.setRuntimeProperty(), for example, "This/StatsArchivalOn". This is a change in behavior over versions earlier than WebSphere Message Broker V7.

        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 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.
      • setRuntimeProperty

        public void setRuntimeProperty(java.lang.String objectAndPropertyName,
                                       java.lang.String propertyValue)
                                throws ConfigManagerProxyLoggedException,
                                       java.lang.IllegalArgumentException
        Asks the broker to configure an arbitrary flow property. Changes are applied immediately.

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

        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, "DynamicSubscriptionEngine/userTraceLevel" would request a change to the integration server's user trace level property. 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, for example "This/StatsSnapPublicationOn"
        propertyValue - The new value to associate with the property, for example "active".
        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.
      • getUserDefinedPropertyNames

        public java.lang.String[] getUserDefinedPropertyNames()
        Returns a String array of the names of all user-defined properties associated with this object. Only names of user-defined properties with a String, Double, Float, Integer, Long, Boolean data types can be returned using this method. Use getUserDefinedProperty() to get the current value associated with a given property and setUserDefinedProperty() to set it.
        Returns:
        String[] containing user-defined property names that have been defined on the broker
      • setUserDefinedProperty

        public void setUserDefinedProperty(java.lang.String propertyName,
                                           java.lang.Object propertyValue)
                                    throws ConfigManagerProxyPropertyNotInitializedException,
                                           ConfigManagerProxyLoggedException,
                                           java.lang.IllegalArgumentException
        Asks the broker to configure a flow's user-defined property. Only existing user-defined properties with a String,Double, Float, Integer, Long, Boolean data type can be configured using this method. An attempt to set the value of a non-existent user-defined property or a property with another data type will cause the method to throw a ConfigManagerProxyLoggedException. The list of currently defined property names can be obtained using the method getUserDefinedPropertyNames().
        Parameters:
        propertyName - The property name of the property being manipulated
        propertyValue - The new value to associate with the property
        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.
        java.lang.IllegalArgumentException - if propertyName is not of the correct syntax.
      • getUserDefinedProperty

        public java.lang.Object getUserDefinedProperty(java.lang.String propertyName)
                                                throws ConfigManagerProxyLoggedException,
                                                       ConfigManagerProxyPropertyNotInitializedException,
                                                       java.lang.IllegalArgumentException
        Returns the value of the user-defined property with the supplied name. Only user-defined properties with a String, Double, Float, Integer, Long, Boolean data types can be returned using this method. An attempt to get the value of a user-defined property with another data type will cause the method to throw a ConfigManagerProxyLoggedException.
        Parameters:
        propertyName - The name of the property to be reported
        Returns:
        Object The value of the supplied property.
        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 property does not exist or its data type is not supported.
        java.lang.IllegalArgumentException - if propertyName is not of the correct syntax.
      • getQueues

        public java.lang.String[] getQueues()
                                     throws ConfigManagerProxyPropertyNotInitializedException
        Returns a list of the MQ queues referenced by this flow. 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 the 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 will return an empty array if the flow was deployed through a Configuration Manager of a version earlier than v6.1.

        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 flow. The names returned are the internal names, which are unique for every node type.
        Returns:
        String[] the names of the node types 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.