|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.broker.config.proxy.BarFile
public class BarFile
Represents a broker archive file on the local filesystem.
After deployment, each deployed artefact contains a property that is the name of the BarFile in which it was successfully deployed. However, to retrieve the complete contents of that BarFile, it must exist on the local filesystem. In other words, once a BarFile is deployed it cannot be accessed directly through the Configuration Manager or broker using this class.
To instantiate BarFile objects, you must use a BarFile factory method. If you modify the BarFile in any way, you must use one of either the save() or saveAs() methods in order to make the changes persistent. For example:
BarFile b = BarFile.loadBarFile("C:\\MyBars\\test.bar"); DeploymentDescriptor d = new DeploymentDescriptor(); // ... b.setDeploymentDescriptor(d); b.save();
com.ibm.broker.config.proxy.BarFile
|
|
Responsibilities | A representation of a broker archive file on the local filesystem. Provides the ability to list the contents and manipulate the deployment descriptor |
Internal Collaborators | com.ibm.broker.config.proxy.DeploymentDescriptor |
Change Activity: -------- ----------- ------------- ------------------------------------ Reason: Date: Originator: Comments: -------- ----------- ------------- ------------------------------------ 45166 2007-06-05 HDMPL v6.1 Release
Method Summary | |
---|---|
java.util.Enumeration<BarEntry> |
getBarEntries()
Returns the set of Bar entries that are contained in the BarFile. |
BarEntry |
getBarEntryByName(java.lang.String filename)
Returns the bar entry that has the supplied name. |
java.util.Enumeration<java.lang.String> |
getBarEntryNames()
Returns the set of Bar entry filenames that are contained in the BarFile. |
DeploymentDescriptor |
getDeploymentDescriptor()
Returns the object that represents the deployment descriptor. |
static BarFile |
loadBarFile(java.lang.String pathAndFileName)
Factory for the BarFile class. |
void |
save()
Saves the contents of the BarFile to a file on the local filesystem. |
void |
saveAs(java.lang.String outputFilename)
Saves the contents of the BarFile to a file on the local filesystem. |
void |
setDeploymentDescriptor(DeploymentDescriptor newDescriptor)
Sets the deployment descriptor associated with this object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static BarFile loadBarFile(java.lang.String pathAndFileName) throws java.io.IOException
pathAndFileName
- Local path and filename that points to the BarFile to be read or created.
java.io.IOException
- if the file could not be successfully readpublic DeploymentDescriptor getDeploymentDescriptor()
public void setDeploymentDescriptor(DeploymentDescriptor newDescriptor)
If backupDescriptorName is not null, the previous deployment descriptor will be renamed inside the Bar file to the file specified. Any path name will be ignored; the backup file will be placed in the META-INF directory and will replace any file of the same name.
If backupBarName is not null, the original Bar file will be backed up to the supplied name before the operation begins.
newDescriptor
- object representing the new deployment
descriptor.public java.util.Enumeration<java.lang.String> getBarEntryNames()
public java.util.Enumeration<BarEntry> getBarEntries()
public BarEntry getBarEntryByName(java.lang.String filename)
filename
- Full path name of the BarEntry
public void save() throws java.io.IOException
filename
- Name of the filename to use to save the BAR file.
java.io.IOException
- if either the contents of the old BAR file could not be read
or the new file could not be written.public void saveAs(java.lang.String outputFilename) throws java.io.IOException
filename
- Name of the filename to use to save the BAR file.
java.io.IOException
- if either the contents of the old BAR file could not be read
or the new file could not be written.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |