Package com.sun.enterprise.module
Interface ModuleDefinition
-
- All Known Implementing Classes:
CookedModuleDefinition
,DefaultModuleDefinition
,ProxyModuleDefinition
public interface ModuleDefinition
A module definition contains all information about a module existence, its dependencies and its exported interfaces. This module meta information can be obtained from different sources and format. For instance OSGi modules use the manifest file and so is the glassfish application server. Others can use api or xml file.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ModuleDependency[]
getDependencies()
Returns the list of this module's dependencies.java.lang.String
getImportPolicyClassName()
Returns the import policy class name.java.lang.String
getLifecyclePolicyClassName()
Returns the lifecycle policy class name.java.net.URI[]
getLocations()
A Module is implemented by one to many jar files.java.util.jar.Manifest
getManifest()
Returns the manifest file for the main module jar fileModuleMetadata
getMetadata()
Gets the metadata that describes various components and services in this module.java.lang.String
getName()
Returns the module name, usually this is the same name as the jar file name containing the module's implementation.java.lang.String[]
getPublicInterfaces()
Returns a list of public interfaces for this module.java.lang.String
getVersion()
Returns the version of this module's implementation
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the module name, usually this is the same name as the jar file name containing the module's implementation.- Returns:
- module name
-
getPublicInterfaces
java.lang.String[] getPublicInterfaces()
Returns a list of public interfaces for this module. Public interface can be packages, interfaces, or classes- Returns:
- a array of public interfaces
-
getDependencies
ModuleDependency[] getDependencies()
Returns the list of this module's dependencies. Each dependency must be satisfied at run time for this module to function properly.- Returns:
- list of dependencies
-
getLocations
java.net.URI[] getLocations()
A Module is implemented by one to many jar files. This method returns the list of jar files implementing the module- Returns:
- the module's list of implementation jars
-
getVersion
java.lang.String getVersion()
Returns the version of this module's implementation- Returns:
- a version number
-
getImportPolicyClassName
java.lang.String getImportPolicyClassName()
Returns the import policy class name. Although the implementation of this policy does not necessary have to implement the ImportPolicy, but could use another interface, it is the responsibility of the associated Repository to invoke that interface when the module is started.- Returns:
- Fully qualified class name that's assignable to
ImportPolicy
, or null if no import policy exists.
-
getLifecyclePolicyClassName
java.lang.String getLifecyclePolicyClassName()
Returns the lifecycle policy class name. Although the implementation of this policy does not necessary have to implement the LifecyclePolicy, but could use another interface, it is the responsibility of the associated Repository to invoke that interface when the module is started.- Returns:
- Fully qualified class name that's assignable to
LifecyclePolicy
, or null if no import policy exists.
-
getManifest
java.util.jar.Manifest getManifest()
Returns the manifest file for the main module jar file- Returns:
- the manifest file
-
getMetadata
ModuleMetadata getMetadata()
Gets the metadata that describes various components and services in this module.- Returns:
- Always non-null.
-
-