Package com.sun.enterprise.module
Class ModuleMetadata
- java.lang.Object
-
- com.sun.enterprise.module.ModuleMetadata
-
- All Implemented Interfaces:
java.io.Serializable
public final class ModuleMetadata extends java.lang.Object implements java.io.SerializableHolds information about /META-INF/services and /META-INF/inhabitants for aModule.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
ModuleDefinitionis allowed to be used in multipleModules, this class may not reference anythingModulespecific.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classModuleMetadata.Entry
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.util.List<Descriptor>>descriptorsMETA-INF/hk2-locator/* cacheprivate java.util.Map<java.lang.String,ModuleMetadata.Entry>entriesModuleMetadata.Entrys keyed by the service name.private static ModuleMetadata.EntryNULL_ENTRYEmpty Entry used to indicate that there's no service.
-
Constructor Summary
Constructors Constructor Description ModuleMetadata()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDescriptors(java.lang.String serviceLocatorName, java.util.Collection<Descriptor> descriptorsToAdd)java.util.Map<java.lang.String,java.util.List<Descriptor>>getDescriptors()java.util.List<java.net.URL>getDescriptors(java.lang.String serviceName)java.lang.Iterable<ModuleMetadata.Entry>getEntries()ModuleMetadata.EntrygetEntry(java.lang.String serviceName)voidload(java.net.URL source, java.lang.String serviceName)voidload(java.net.URL source, java.lang.String serviceName, java.io.InputStream is)
-
-
-
Field Detail
-
descriptors
private java.util.Map<java.lang.String,java.util.List<Descriptor>> descriptors
META-INF/hk2-locator/* cache
-
entries
private final java.util.Map<java.lang.String,ModuleMetadata.Entry> entries
ModuleMetadata.Entrys keyed by the service name.
-
NULL_ENTRY
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.
-
-
Method Detail
-
getDescriptors
public java.util.Map<java.lang.String,java.util.List<Descriptor>> getDescriptors()
-
addDescriptors
public void addDescriptors(java.lang.String serviceLocatorName, java.util.Collection<Descriptor> descriptorsToAdd)
-
getEntry
public ModuleMetadata.Entry getEntry(java.lang.String serviceName)
-
getEntries
public java.lang.Iterable<ModuleMetadata.Entry> getEntries()
-
getDescriptors
public java.util.List<java.net.URL> getDescriptors(java.lang.String serviceName)
-
load
public void load(java.net.URL source, java.lang.String serviceName) throws java.io.IOException- Throws:
java.io.IOException
-
load
public void load(java.net.URL source, java.lang.String serviceName, java.io.InputStream is) throws java.io.IOException- Throws:
java.io.IOException
-
-