com.sun.enterprise.module
Class ModuleMetadata

java.lang.Object
  extended by com.sun.enterprise.module.ModuleMetadata
All Implemented Interfaces:
java.io.Serializable

public final class ModuleMetadata
extends java.lang.Object
implements java.io.Serializable

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
See Also:
Serialized Form

Nested Class Summary
static class ModuleMetadata.Entry
           
 
Constructor Summary
ModuleMetadata()
           
 
Method Summary
 void addHabitat(java.lang.String name, InhabitantsDescriptor descriptor)
           
 byte[] getDescriptorFile(java.lang.String name)
          Retrieve descriptor file for named servicelocator
 java.util.List<Descriptor> getDescriptors()
           
 java.util.List<java.net.URL> getDescriptors(java.lang.String serviceName)
           
 java.lang.Iterable<ModuleMetadata.Entry> getEntries()
           
 ModuleMetadata.Entry getEntry(java.lang.String serviceName)
           
 java.util.List<InhabitantsDescriptor> getHabitats(java.lang.String name)
           
 void load(java.net.URL source, java.lang.String serviceName)
           
 void load(java.net.URL source, java.lang.String serviceName, java.io.InputStream is)
           
 void loadHk2Descriptor(java.net.URL url, java.lang.String locatorName, java.io.InputStream is)
           
 void setDescriptors(java.util.List<Descriptor> descriptors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleMetadata

public ModuleMetadata()
Method Detail

getDescriptorFile

public byte[] getDescriptorFile(java.lang.String name)
Retrieve descriptor file for named servicelocator

Parameters:
name -
Returns:

loadHk2Descriptor

public void loadHk2Descriptor(java.net.URL url,
                              java.lang.String locatorName,
                              java.io.InputStream is)
                       throws java.io.IOException
Throws:
java.io.IOException

getDescriptors

public java.util.List<Descriptor> getDescriptors()

setDescriptors

public void setDescriptors(java.util.List<Descriptor> descriptors)

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

addHabitat

public void addHabitat(java.lang.String name,
                       InhabitantsDescriptor descriptor)

getHabitats

public java.util.List<InhabitantsDescriptor> getHabitats(java.lang.String name)


Copyright © 2012 Oracle Corporation. All Rights Reserved.