com.ibm.broker.config.proxy
Class MessageFlowDependency

java.lang.Object
  extended by com.ibm.broker.config.proxy.MessageFlowDependency
All Implemented Interfaces:
DeployableObject, DeployedObject

public class MessageFlowDependency
extends java.lang.Object
implements DeployedObject

Represents an object deployed to an execution group that is required in order for it to process message flow logic.

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

     ConfigManagerConnectionParameters cmcp =
         new MQConfigManagerConnectionParameters("localhost", 1414, "QMGR");
     ConfigManagerProxy cmp = ConfigManagerProxy.getInstance(cmcp);
     TopologyProxy t = cmp.getTopology();
     BrokerProxy b = t.getBrokerByName("BROKER1");
     ExecutionGroupProxy e = b.getExecutionGroupByName("default");
     MessageFlowDependency mfd = e.getMessageFlowDependencyByName("mrm.dictionary");
 
Unlike MessageFlowProxy and other AdministeredObject children, MessageFlowDependency is a short-lived class. Instances are generated on demand to represent data logically owned by, and updated in, the ExecutionGroupProxy object. This means that the information described in each MessageFlowDependency does not get updated once it has been initially populated, and any changes to dependencies are sent to AdministeredObjectListener instances registered on the ExecutionGroupProxy object.

When connected to v5 Configuration Managers, the only supported dependency type is the message set. Later Configuration Managers support other types (such as XSL Stylesheets). Furthermore, version information (such as the deploy time and version string) is not available when connected to a v5 Configuration Manager (or when referring to objects deployed using a v5 Configuration Manager).

com.ibm.broker.config.proxy.MessageFlowDependency implements com.ibm.broker.config.proxy.DeployedObject

Responsibilities Represents an object deployed to an execution group that is required in order for it to process message flow logic.
Internal Collaborators None

 Change Activity:
 -------- ----------- -------------   ------------------------------------
 Reason:  Date:       Originator:     Comments:
 -------- ----------- -------------   ------------------------------------
 25103.8  2004-03-18  HDMPL           v6 Release
 44739.7  2007-07-30  HDMPL           v6.1 Release

 

Version:
Config/com/ibm/broker/config/proxy/MessageFlowDependency.java, CMP, S000 1.12

Field Summary
 
Fields inherited from interface com.ibm.broker.config.proxy.DeployableObject
BARNAME_KEYWORD, VERSION_KEYWORD
 
Method Summary
 java.lang.String getBARFileName()
          Returns the name of the BAR file that was used to deploy the dependency to the execution group.
 java.util.Date getDeployTime()
          Returns the time that the current dependency was last received by the Configuration Manager for deployment to the execution group.
 ExecutionGroupProxy getExecutionGroup()
          Returns a reference to the execution group on which this dependency was deployed.
 java.lang.String getFileExtension()
          Returns the file extension of the current dependency.
 java.lang.String getFullName()
          Returns the name of the current dependency as it existed in the BAR file at deployment time- including any file extension but excluding any path information.
 java.lang.String[] getKeywords()
          Returns the set of keywords for this dependency which were found embedded in the object at deploy time.
 java.lang.String getKeywordValue(java.lang.String keyword)
          Returns the value of the supplied keyword.
 java.util.Date getModifyTime()
          Returns the time that the current dependency was last modified, according to the file modification date set in the broker archive file.
 java.lang.String getName()
          Returns the name of the current dependency.
 java.lang.String getVersion()
          Returns the version string for this dependency as it was set at deploy time.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getFileExtension

public java.lang.String getFileExtension()
Returns the file extension of the current dependency. The String returned is taken from the name of the file as it existed in the BAR file at deployment time- from the first character after the last period ('.') to the end of the filename.

Note that the only message flow dependency supported on v5 Configuration Managers is the message set, and so this method will return the constant string "dictionary" when connected to v5 Configuration Managers. the file ext, or if the Configuration Manager Proxy is connected to a v5 Configuration Manager, this method returns null.

Specified by:
getFileExtension in interface DeployableObject
Returns:
String file extension, or the empty string if the file did not have any extension.

getDeployTime

public java.util.Date getDeployTime()
Returns the time that the current dependency was last received by the Configuration Manager for deployment to the execution group. If the dependency was deployed using a v5 Configuration Manager, or if the Configuration Manager Proxy is connected to a v5 Configuration Manager, this method returns null.

Specified by:
getDeployTime in interface DeployedObject
Returns:
Date the time of the most recent deployment, or null if the information is not available.

getModifyTime

public java.util.Date getModifyTime()
Returns the time that the current dependency was last modified, according to the file modification date set in the broker archive file. If the dependency was deployed using a v5 Configuration Manager, or if the Configuration Manager Proxy is connected to a v5 Configuration Manager, this method returns null.

Specified by:
getModifyTime in interface DeployableObject
Returns:
Date the time of the most last modification, or null if the information is not available.

getName

public java.lang.String getName()
                         throws ConfigManagerProxyPropertyNotInitializedException
Returns the name of the current dependency. This is taken from the name of the file as it existed in the BAR file at deployment time- up to but excluding the last period ('.').

Specified by:
getName in interface DeployableObject
Returns:
String name of the deployable
Throws:
ConfigManagerProxyPropertyNotInitializedException - If information on the name was not supplied by the Configuration Manager before a timeout occurred.

getFullName

public java.lang.String getFullName()
                             throws ConfigManagerProxyPropertyNotInitializedException
Returns the name of the current dependency as it existed in the BAR file at deployment time- including any file extension but excluding any path information. If the dependency was deployed using a v5 Configuration Manager, or if the Configuration Manager Proxy is connected to a v5 Configuration Manager, this method returns null.

Specified by:
getFullName in interface DeployableObject
Returns:
String name of the deployable
Throws:
ConfigManagerProxyPropertyNotInitializedException - If information on the name was not supplied by the Configuration Manager before a timeout occurred.

getVersion

public java.lang.String getVersion()
                            throws ConfigManagerProxyPropertyNotInitializedException
Returns the version string for this dependency as it was set at deploy time. If no string was set the return value is not specified.

Specified by:
getVersion in interface DeployableObject
Returns:
String version information
Throws:
ConfigManagerProxyPropertyNotInitializedException - If information on the version was not supplied by the Configuration Manager before a timeout occurred.

getExecutionGroup

public ExecutionGroupProxy getExecutionGroup()
                                      throws ConfigManagerProxyLoggedException
Returns a reference to the execution group on which this dependency was deployed.

Specified by:
getExecutionGroup in interface DeployedObject
Returns:
ExecutionGroupProxy
Throws:
ConfigManagerProxyLoggedException - if the parent object is not immediately available and has to be requested from the Configuration Manager, but the request could not be sent to the Configuration Manager.

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
String

getKeywords

public java.lang.String[] getKeywords()
                               throws ConfigManagerProxyPropertyNotInitializedException
Returns the set of keywords for this dependency which were found embedded in the object at deploy time. Use MessageFlowDependency.getKeywordValue() to look up the value of a given keyword.

See the DeployedObject class for an overview of how to associate keywords with deployed objects.

Specified by:
getKeywords in interface DeployableObject
Returns:
String[] the set of keywords that were found.
Throws:
ConfigManagerProxyPropertyNotInitializedException - If information on the set of keywords was not supplied by the Configuration Manager before a timeout occurred.
See Also:
DeployableObject.getKeywords()

getKeywordValue

public java.lang.String getKeywordValue(java.lang.String keyword)
                                 throws ConfigManagerProxyPropertyNotInitializedException
Returns the value of the supplied keyword. If the supplied keyword was not found during the deployment of this object, this method returns null.

See the DeployedObject class for an overview of how to associate keywords with deployed objects.

Specified by:
getKeywordValue in interface DeployableObject
Parameters:
keyword - The keyword to look up
Returns:
String value of the supplied keyword, or null if the keyword could not be found for the object.
Throws:
ConfigManagerProxyPropertyNotInitializedException - If information on the deployed object was not supplied by the Configuration Manager before a timeout occurred.
See Also:
DeployableObject.getKeywordValue(java.lang.String)

getBARFileName

public java.lang.String getBARFileName()
                                throws ConfigManagerProxyPropertyNotInitializedException
Returns the name of the BAR file that was used to deploy the dependency to the execution group. This method will return null if:

Specified by:
getBARFileName in interface DeployedObject
Returns:
String name of the BAR file that deployed the object
Throws:
ConfigManagerProxyPropertyNotInitializedException - If information on the name was not supplied by the Configuration Manager before a timeout occurred.