com.sun.enterprise.module
Interface ModuleDefinition

All Known Implementing Classes:
CookedModuleDefinition, DefaultModuleDefinition, OSGiModuleDefinition, 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.

Author:
Jerome Dochez

Method Summary
 ModuleDependency[] getDependencies()
          Returns the list of this module's dependencies.
 String getImportPolicyClassName()
          Returns the import policy class name.
 String getLifecyclePolicyClassName()
          Returns the lifecycle policy class name.
 URI[] getLocations()
          A Module is implemented by one to many jar files.
 Manifest getManifest()
          Returns the manifest file for the main module jar file
 ModuleMetadata getMetadata()
          Gets the metadata that describes various components and services in this module.
 String getName()
          Returns the module name, usually this is the same name as the jar file name containing the module's implementation.
 String[] getPublicInterfaces()
          Returns a list of public interfaces for this module.
 String getVersion()
          Returns the version of this module's implementation
 

Method Detail

getName

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

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

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

String getVersion()
Returns the version of this module's implementation

Returns:
a version number

getImportPolicyClassName

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

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

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.


Copyright © 2013 Oracle Corporation. All Rights Reserved.