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

public final Class ModuleMetadata

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
org.glassfish.hk2.api.Descriptor, java.io.IOException, .InputStream, .Serializable, java.net.URL, java.util.*, java.util.concurrent.locks.ReentrantLock

Holds information about /META-INF/services and /META-INF/inhabitants for a Module.

A Service implementation is identified by the service interface it implements, the implementation class of that service interface and the module in which that implementation resides.

Note that since a single ModuleDefinition is allowed to be used in multiple Modules, this class may not reference anything Module specific.

Author
Kohsuke Kawaguchi

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private Map<String, List<Descriptor>>
descriptors

META-INF/hk2-locator/* cache

private final Map<String, ModuleMetadata.Entry>
entries

Entrys keyed by the service name.

private final ReentrantLock
private static final ModuleMetadata.Entry
NULL_ENTRY

Empty Entry used to indicate that there's no service.

private static long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addDescriptors(String serviceLocatorName, Collection<Descriptor> descriptorsToAdd)

public Map<String, List<Descriptor>>
public List<URL>
getDescriptors(String serviceName)

public Iterable<ModuleMetadata.Entry>
public ModuleMetadata.Entry
getEntry(String serviceName)

public void
load(URL source, String serviceName)

public void
load(URL source, String serviceName, InputStream is)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

descriptorsback to summary
private Map<String, List<Descriptor>> descriptors

META-INF/hk2-locator/* cache

entriesback to summary
private final Map<String, ModuleMetadata.Entry> entries

Entrys keyed by the service name.

lockback to summary
private final ReentrantLock lock
NULL_ENTRYback to summary
private static final ModuleMetadata.Entry NULL_ENTRY

Empty Entry used to indicate that there's no service. This is mutable, so its working correctly depends on the good will of the callers.

serialVersionUIDback to summary
private static long serialVersionUID

Constructor Detail

ModuleMetadataback to summary
public ModuleMetadata()

Method Detail

addDescriptorsback to summary
public void addDescriptors(String serviceLocatorName, Collection<Descriptor> descriptorsToAdd)
getDescriptorsback to summary
public Map<String, List<Descriptor>> getDescriptors()
getDescriptorsback to summary
public List<URL> getDescriptors(String serviceName)
getEntriesback to summary
public Iterable<ModuleMetadata.Entry> getEntries()
getEntryback to summary
public ModuleMetadata.Entry getEntry(String serviceName)
loadback to summary
public void load(URL source, String serviceName) throws IOException
loadback to summary
public void load(URL source, String serviceName, InputStream is) throws IOException
com.sun.enterprise.module back to summary

public final Class ModuleMetadata.Entry

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

Field Summary

Modifier and TypeField and Description
public final List<String>
public final List<URL>
private static long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
private void
load(URL source, InputStream is)

Loads a single service file.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

providerNamesback to summary
public final List<String> providerNames
resourcesback to summary
public final List<URL> resources
serialVersionUIDback to summary
private static long serialVersionUID

Constructor Detail

Entryback to summary
public Entry()

Method Detail

hasProviderback to summary
public boolean hasProvider()
loadback to summary
private void load(URL source, InputStream is) throws IOException

Loads a single service file.