All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.beans.mb.NetRepositoryModel
java.lang.Object
|
+----com.ibm.beans.mb.RepositoryModel
|
+----com.ibm.beans.mb.NetRepositoryModel
- public class NetRepositoryModel
- extends RepositoryModel
This class contains the function for reading a repository
over the network via the services of Network Deployment.
A network repository is specified by either a class contained
within the repository, or a 32 digit hex item id.
The URL syntax for specifying a Net repository is:
beans.net://<hostname[:port]>/<servername>/[<item-key>]
For example:
beans.net://repoman.ibm.com/myServer/myClass.class
to specify a repository by class name, or
beans.net://repoman.ibm.com/myServer/CA2718A8128B3141C1618D0618E0496F
to specify a repository by warehouse item id. The hostname or
servername value may be an asterisk "*", in which case a locally
configured default value will be used. See the section on Network Deployment
in the Guide To Features for more details.
Note that RepositoryModels are obtained from the
RepositoryModelFactory. The typical use of a RepositoryModel is:
RepositoryModelFactory.initialize();
...
repo = RepositoryModelFactory.createRepositoryModel(url, mode);
repo.doOpen(); // reads repository (if necessary)
...
repo.doClose(); // writes repository (if necessary)
RepositoryModelFactory.destroyRepositoryModel(repo);
- See Also:
- RepositoryModel, RepositoryModelFactory
-
NetRepositoryModel(URL, int)
- Constructs a NetRepositoryModel.
-
doClose()
- Closes the RepositoryModel.
-
doOpen()
- Opens the NetRepositoryModel, determines which elements
exist in the repository, and builds a set of ManagedBeans and
MBElements to reflect the repository contents.
-
finalize()
- Cleanup: remove the local Jar file from the working directory.
-
reconstituteManagedBean(ManagedBean)
- Re-loads the MBElement data for the specified ManagedBean
from this RepositoryModel.
NetRepositoryModel
protected NetRepositoryModel(URL url,
int mode)
- Constructs a NetRepositoryModel.
- Parameters:
- url - The location of the repository.
- mode - READ_ONLY, WRITE_ONLY, or READ_WRITE.
- See Also:
- RepositoryModel, RepositoryModelFactory
doOpen
public synchronized void doOpen() throws FileNotFoundException, InstantiationException, IllegalAccessException, InstantiationError, IOException
- Opens the NetRepositoryModel, determines which elements
exist in the repository, and builds a set of ManagedBeans and
MBElements to reflect the repository contents.
- Throws: FileNotFoundException
- Thrown if the repository cannot
be found in the file system.
- Throws: IOException
- Thrown if an error occurs while reading the repository.
- Throws: InstantiationException
- Thrown if an error occurs while building an MBElement
- Throws: IllegalAccessException
- Thrown if an error occurs while building an MBElement
- Throws: InstantiationError
- Thrown if an attempt is made to build an
unknown subclass of MBElement or if a file listed in the manifest
does not exist.
- Overrides:
- doOpen in class RepositoryModel
doClose
public synchronized void doClose() throws IOException
- Closes the RepositoryModel.
- Throws: IOException
- Thrown if an IO problem occurs while
writing the RepositoryModel.
- Overrides:
- doClose in class RepositoryModel
reconstituteManagedBean
public synchronized boolean reconstituteManagedBean(ManagedBean mb) throws IOException
- Re-loads the MBElement data for the specified ManagedBean
from this RepositoryModel. Use this
method after a ManagedBean is deserialized.
- Parameters:
- mb - The ManagedBean to be reconstituted.
- Returns:
- true if successful, false otherwise.
- Throws: IOException
- Thrown if an IO problem occurs while
reading the RepositoryModel or the miscellaneous MBElement files.
- Overrides:
- reconstituteManagedBean in class RepositoryModel
finalize
protected void finalize()
- Cleanup: remove the local Jar file from the working directory.
- Overrides:
- finalize in class Object
All Packages Class Hierarchy This Package Previous Next Index