public class RuntimeManifestManager
extends com.streamscape.sef.dispatcher.AbstractPackageManifestManager
Title: Service Event Fabric Runtime
Description: Defines a Package Manifest Manager used by the Runtime Context. It includes factory capabilities allowing users to register packages that can be auto-loaded at runtime startup.
Copyright: Copyright (c) 2010
Company: StreamScape Technologies
DEFAULT_SERIAL_VERSION_ID
Modifier and Type | Method and Description |
---|---|
void |
addPackageAt(int position,
PackageDescriptor descriptor)
Adds the specified package descriptor to the manifest at the specified position.
|
java.util.List |
getComponentManifestManagers() |
java.util.List |
getComponentManifestManagers(ComponentModel model) |
void |
loadPackage(java.lang.String name,
boolean checkDependencies)
Loads the specified package to the package loader registry.
|
void |
removePackage(java.lang.String name)
Removes the specified package from the manifest.
|
void |
unloadPackage(java.lang.String name,
boolean checkDependencies)
Unloads the specified package from the package loader registry.
|
void |
updatePackage(PackageDescriptor descriptor,
Package pkg)
Updates the existing package with the specified descriptor.
|
void |
updatePackageAt(int position,
PackageDescriptor descriptor,
Package pkg)
Updates the existing package with the specified descriptor and moves it to the specified position.
|
addPackage, doUpdatePackageAt, existsPackage, getLoaderRegistry, getManifestClassLoader, getPackage, getPackageByArchive, getPackageBySemanticType, getPackagePosition, getPackagePosition, getPackages, getPosition, isPackageLoaded, isPackageLoaded, listLoadedPackages, listPackages, loadPackage, setPackageScope, unloadPackage, validatePackage
clone, getSerialVersionUID
public java.util.List getComponentManifestManagers()
public java.util.List getComponentManifestManagers(ComponentModel model)
public void addPackageAt(int position, PackageDescriptor descriptor) throws PackageManifestException
PackageManifestManager
descriptor.isAutoload() == true
this package will be automatically loaded
to the package loader registry.addPackageAt
in interface PackageManifestManager
addPackageAt
in class com.streamscape.sef.dispatcher.AbstractPackageManifestManager
position
- the position where the package will be added.descriptor
- the package descriptor to be added.PackageManifestException
- if the specified package already exists.public void updatePackage(PackageDescriptor descriptor, Package pkg) throws PackageManifestException
PackageManifestManager
pkg
is not null
it will be updated in the Repository.updatePackage
in interface PackageManifestManager
updatePackage
in class com.streamscape.sef.dispatcher.AbstractPackageManifestManager
descriptor
- the package descriptor to be updated.pkg
- the package to be updated.PackageManifestException
- if some error occurs.public void updatePackageAt(int position, PackageDescriptor descriptor, Package pkg) throws PackageManifestException
PackageManifestManager
descriptor.isAutoload() == true
this package will be automatically loaded
to the package loader registry after update.
pkg
is not null
it will be updated in the Repository.updatePackageAt
in interface PackageManifestManager
updatePackageAt
in class com.streamscape.sef.dispatcher.AbstractPackageManifestManager
position
- the position where the package will be moved.descriptor
- the package descriptor to be updated.pkg
- the package to be updated.PackageManifestException
- if some error occurs.public void removePackage(java.lang.String name) throws javax.naming.NamingException, PackageManifestException
PackageManifestManager
sdo.TestPackage
).removePackage
in interface PackageManifestManager
removePackage
in class com.streamscape.sef.dispatcher.AbstractPackageManifestManager
name
- the name of package to be removed.javax.naming.NamingException
- if the specified name has invalid format.PackageManifestException
- if the specified package does not exist or
if the specified package is loaded the package loader registry.public void loadPackage(java.lang.String name, boolean checkDependencies) throws javax.naming.NamingException, PackageManifestException
PackageManifestManager
sdo.TestPackage
).
If checkDependencies
is true
, all entities (semantic types and event prototypes)
depending on the package will be checked. They will be marked as valid if their classes are successfully loaded.
Setting this parameter to false
may allow to load the package faster. This can be important
in the case of a large package with many classes.
This method loads all JARs associated with the package to a new class loader. Depending on the package parameters, this class loader can be included to the class loaders chain of the registry and can be set as root of this chain.
loadPackage
in interface PackageManifestManager
loadPackage
in class com.streamscape.sef.dispatcher.AbstractPackageManifestManager
name
- the name of package to be loaded.checkDependencies
- true
if the dependent entities will be checked after the package loading, false
otherwise.javax.naming.NamingException
- if the specified name has invalid format.PackageManifestException
- if the specified package does not exist in the manifest manager or
if some error occurs during this operation execution.public void unloadPackage(java.lang.String name, boolean checkDependencies) throws javax.naming.NamingException, PackageManifestException
PackageManifestManager
sdo.TestPackage
).
If checkDependencies
is true
, all entities (semantic types and event prototypes)
depending on the package will be checked. They will be marked as invalid after their classes are unloaded.
Setting this parameter to false
may allow to unload the package faster. This can be important
in the case of a large package with many classes.
This method tries to properly unload all JARs associated with the package and removes the corresponding class loader from the registry.
unloadPackage
in interface PackageManifestManager
unloadPackage
in class com.streamscape.sef.dispatcher.AbstractPackageManifestManager
name
- the name of package to be unloaded.checkDependencies
- true
if the dependent entities will be checked after the package unloading, false
otherwise.javax.naming.NamingException
- if the specified name has invalid format.PackageManifestException
- if the specified package does not exist in the manifest manager or
if the specified package is not loaded to package loader registry or
if some error occurs during this operation execution.Copyright © 2015-2024 StreamScape Technologies. All rights reserved.