public interface DeployedObject
Each instance of a class that implements this interface represents a file that has been successfully deployed to a single execution group.
There are currently two classes that implement this interface, both of which live in the com.ibm.broker.config.proxy package:
Classes that implement this interface are able to describe lists of keywords and their values that may be associated with the deployed object. For the two implementors described above, keywords and their values are embedded inside the object's file as deployed inside the broker archive file. Each keyword/value pair is found inside the contents of the deployed object's file, surrounded with an eyecatcher value. The eyecatcher begins with $MQSI, ends with MQSI$ and the keyword is separated from the value with an equals sign ('='). For example, if the following string is found within a deployed file's contents:
    
$MQSI apfel=strudel MQSI$
then the keyword apfel will be associated with the value
strudel for that deployed object.
Keywords should be unique within each deployed file. If a keyword is repeated, the value returned from the getKeywordValue() method will be the one associated with the earliest occurrence of the keyword in the deployed file's contents.
Leading and trailing spaces between the components of the eyecatcher are ignored, and there is an optional underscore after $MQSI. With this in mind, the case-insensitive regular expression that is used to match each keyword and value is:
    
\$MQSI[\s_]?[\s]*([^=]+?)[\s]*=[\s]*(.*?)[\s]*MQSI\$
The two sections of the expression in parentheses describe the keyword
and value respectively.
The keyword with the name described by VERSION_KEYWORD is embedded in compiled message flow and dictionary files by the Message Brokers Toolkit, if a value has been configured in the appropriate editor. The keyword with the name described by BARNAME_KEYWORD is reserved by the Configuration Manager, for describing to the Config Manager Proxy the name of the broker archive file that deployed each object.
Keywords can appear anywhere in each deployed file. The most effective way of adding additional keywords to message flows is to set them as the string attribute of passthrough nodes, or in ESQL comments or strings. See the main Message Broker documentation for hints on how to effectively embed keywords in other deployable object types.
Note that when deploying Java archive (.jar) files within a broker archive, keywords are not extracted from the .jar file itself, but from an optional file called META-INF/keywords.txt from within the JAR.
interface
com.ibm.broker.config.proxy.DeployedObject
|
|
Responsibilities | States that implementing classes represent objects that have been deployed to execution groups. |
Internal Collaborators | None |
Change Activity: -------- ----------- ------------- ------------------------------------ Reason: Date: Originator: Comments: -------- ----------- ------------- ------------------------------------ f35474 2004-07-15 HDMPL v6 Release
Field | Description |
---|---|
BARNAME_KEYWORD | The keyword used to denote the BAR File name of a DeployedObject. |
VERSION_KEYWORD | The keyword used to denote the version of a DeployedObject. |
Method | Description |
---|---|
String getBARFileName() | Returns the name of the BAR file that was used to deploy the object to the execution group. |
Date getDeployTime() | Returns the time that the current deployed object 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 deployed object was deployed. |
String getFileExtension() | Returns the file extension of the current deployed object. |
String getFullName() | Returns the name of the current deployed object as it existed in the BAR file at deployment time- including any file extension but excluding any path information. |
String[] getKeywords() | Returns the set of keywords for this deployed object which were found embedded in the object at deploy time. |
String getKeywordValue(String) | Returns the value of the supplied keyword. |
Date getModifyTime() | Returns the time that the current deployed object was last modified, according to the file modification date set in the broker archive file. |
String getName() | Returns the name of the current deployed object. |
String getVersion() | Returns the value of the 'version' keyword if it was embedded in the object at deploy time. |
public static final java.lang.String BARNAME_KEYWORDThe keyword used to denote the BAR File name of a DeployedObject.
public static final java.lang.String VERSION_KEYWORDThe keyword used to denote the version of a DeployedObject.
public String getBARFileName() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the name of the BAR file that was used to deploy the object to the execution group. This method will return null if:
- the connected Configuration Manager is of a version earlier than v6, or
- the object was deployed using the v5.x Rapid Application Development tools, or
- the BAR file was deployed by specifying an InputStream parameter to ExecutionGroupProxy.deploy() and a valid BAR file label was not supplied.
- 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.
public Date getDeployTime()Returns the time that the current deployed object was last received by the Configuration Manager for deployment to the execution group.
- Returns
- Date the time of the most recent deployment.
public ExecutionGroupProxy getExecutionGroup() throws ConfigManagerProxyLoggedExceptionReturns a reference to the execution group on which this deployed object was deployed.
- 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.
public String getFileExtension()Returns the file extension of the current deployed object. 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.
- Returns
- String file extension, or the empty string if the file did not have any extension.
public String getFullName() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the name of the current deployed object as it existed in the BAR file at deployment time- including any file extension but excluding any path information.
- Returns
- String name of the deployable
- Throws
ConfigManagerProxyPropertyNotInitializedException
If information on the name was not supplied by the Configuration Manager before a timeout occurred.
public String[] getKeywords() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the set of keywords for this deployed object which were found embedded in the object at deploy time. Use DeployedObject.getKeywordValue() to look up the value of a given keyword.
See the top of this file for an overview of how to associate keywords with deployed objects.
- 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.
public String getKeywordValue(String keyword) throws ConfigManagerProxyPropertyNotInitializedExceptionReturns 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 top of this file for an overview of how to associate keywords with deployed objects.
- 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.
public Date getModifyTime()Returns the time that the current deployed object was last modified, according to the file modification date set in the broker archive file.
- Returns
- Date the time of the most last modification.
public String getName() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the name of the current deployed object. 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 ('.').
- Returns
- String name of the deployable
- Throws
ConfigManagerProxyPropertyNotInitializedException
If information on the name was not supplied by the Configuration Manager before a timeout occurred.
public String getVersion() throws ConfigManagerProxyPropertyNotInitializedExceptionReturns the value of the 'version' keyword if it was embedded in the object at deploy time. If no string was set the return value is null.
- Returns
- String version information
- Throws
ConfigManagerProxyPropertyNotInitializedException
If information on the version was not supplied by the Configuration Manager before a timeout occurred.