Top Description Fields Constructors Methods
com.sun.enterprise.module.single

public Class ProxyModuleDefinition

extends Object
implements ModuleDefinition
Class Inheritance
All Implemented Interfaces
com.sun.enterprise.module.ModuleDefinition
Imports
java.io.DataInputStream, .File, .IOException, .InputStream, java.net.URI, .URISyntaxException, .URL, .URLClassLoader, .URLConnection, java.util.ArrayList, .List, java.util.jar.Manifest, java.util.logging.Level, .Logger, com.sun.enterprise.module.ModuleDefinition, .ModuleDependency, .ModuleMetadata

Creates a ModuleDefinition backed up by a a single classloader.

The implementation does not cache any data - everything is recalculated for each call. Callers are therefore encouraged to either supply their own caching, or minimize the calls to methods of this class.

Author
Jerome Dochez

Field Summary

Modifier and TypeField and Description
private final ClassLoader
private final List<ManifestProxy.SeparatorMappings>

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
protected Manifest
public ModuleDependency[]
getDependencies()

Implements com.sun.enterprise.module.ModuleDefinition.getDependencies.

Returns the list of this module's dependencies.

public String
public String
public URI[]
getLocations()

Implements com.sun.enterprise.module.ModuleDefinition.getLocations.

A Module is implemented by one to many jar files.

public Manifest
getManifest()

Implements com.sun.enterprise.module.ModuleDefinition.getManifest.

Returns the manifest file for the main module jar file

public ModuleMetadata
getMetadata()

Implements com.sun.enterprise.module.ModuleDefinition.getMetadata.

Gets the metadata that describes various components and services in this module.

public String
getName()

Implements com.sun.enterprise.module.ModuleDefinition.getName.

Returns the module name, usually this is the same name as the jar file name containing the module's implementation.

public String[]
getPublicInterfaces()

Implements com.sun.enterprise.module.ModuleDefinition.getPublicInterfaces.

Returns a list of public interfaces for this module.

public String
getVersion()

Implements com.sun.enterprise.module.ModuleDefinition.getVersion.

Returns the version of this module's implementation

private static boolean
private static boolean
ok(String[] ss)

private static byte[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classLoaderback to summary
private final ClassLoader classLoader
mappingsback to summary
private final List<ManifestProxy.SeparatorMappings> mappings

Constructor Detail

ProxyModuleDefinitionback to summary
public ProxyModuleDefinition(ClassLoader classLoader) throws IOException
ProxyModuleDefinitionback to summary
public ProxyModuleDefinition(ClassLoader classLoader, List<ManifestProxy.SeparatorMappings> mappings) throws IOException

Method Detail

generateback to summary
protected Manifest generate(ModuleMetadata metadata)
getDependenciesback to summary
public ModuleDependency[] getDependencies()

Implements com.sun.enterprise.module.ModuleDefinition.getDependencies.

Doc from com.sun.enterprise.module.ModuleDefinition.getDependencies.

Returns the list of this module's dependencies. Each dependency must be satisfied at run time for this module to function properly.

getImportPolicyClassNameback to summary
public String getImportPolicyClassName()

Implements com.sun.enterprise.module.ModuleDefinition.getImportPolicyClassName.

Doc from com.sun.enterprise.module.ModuleDefinition.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.

getLifecyclePolicyClassNameback to summary
public String getLifecyclePolicyClassName()

Implements com.sun.enterprise.module.ModuleDefinition.getLifecyclePolicyClassName.

Doc from com.sun.enterprise.module.ModuleDefinition.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.

getLocationsback to summary
public URI[] getLocations()

Implements com.sun.enterprise.module.ModuleDefinition.getLocations.

Doc from com.sun.enterprise.module.ModuleDefinition.getLocations.

A Module is implemented by one to many jar files. This method returns the list of jar files implementing the module

getManifestback to summary
public Manifest getManifest()

Implements com.sun.enterprise.module.ModuleDefinition.getManifest.

Doc from com.sun.enterprise.module.ModuleDefinition.getManifest.

Returns the manifest file for the main module jar file

getMetadataback to summary
public ModuleMetadata getMetadata()

Implements com.sun.enterprise.module.ModuleDefinition.getMetadata.

Doc from com.sun.enterprise.module.ModuleDefinition.getMetadata.

Gets the metadata that describes various components and services in this module.

getNameback to summary
public String getName()

Implements com.sun.enterprise.module.ModuleDefinition.getName.

Doc from com.sun.enterprise.module.ModuleDefinition.getName.

Returns the module name, usually this is the same name as the jar file name containing the module's implementation.

getPublicInterfacesback to summary
public String[] getPublicInterfaces()

Implements com.sun.enterprise.module.ModuleDefinition.getPublicInterfaces.

Doc from com.sun.enterprise.module.ModuleDefinition.getPublicInterfaces.

Returns a list of public interfaces for this module. Public interface can be packages, interfaces, or classes

getVersionback to summary
public String getVersion()

Implements com.sun.enterprise.module.ModuleDefinition.getVersion.

Doc from com.sun.enterprise.module.ModuleDefinition.getVersion.

Returns the version of this module's implementation

okback to summary
private static boolean ok(String s)
okback to summary
private static boolean ok(String[] ss)
readFullyback to summary
private static byte[] readFully(URL url) throws IOException