Module.State| Modifier and Type | Field and Description |
|---|---|
static org.jboss.gravia.resource.AttachmentKey<ModuleEntriesProvider> |
MODULE_ENTRIES_PROVIDER_KEY |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractModule(AbstractRuntime runtime,
ClassLoader classLoader,
org.jboss.gravia.resource.Resource resource,
Dictionary<String,String> headers) |
| Modifier and Type | Method and Description |
|---|---|
<A> A |
adapt(Class<A> type)
Addapt this module to another type.
|
void |
addServiceInUse(ServiceReference<?> serviceState) |
static AbstractModule |
assertAbstractModule(Module module) |
protected void |
assertNotUninstalled() |
List<URL> |
findEntries(String path,
String filePattern,
boolean recurse)
Returns entries in this module.
|
<T> T |
getAttachment(org.jboss.gravia.resource.AttachmentKey<T> key) |
protected abstract Bundle |
getBundleAdaptor(Module module) |
protected ClassLoader |
getClassLoader() |
URL |
getEntry(String path)
Returns a URL to the entry at the specified path in this module.
|
List<String> |
getEntryPaths(String path)
Returns an Enumeration of all the paths (
String objects) to
entries within this module whose longest sub-path matches the specified
path. |
Dictionary<String,String> |
getHeaders()
Returns this module's headers and values that where given on module installation.
|
org.jboss.gravia.resource.ResourceIdentity |
getIdentity()
Get the identity of this module.
|
protected AbstractRuntime |
getRuntime() |
Set<ServiceReference<?>> |
getServicesInUseInternal() |
<T> boolean |
hasAttachment(org.jboss.gravia.resource.AttachmentKey<T> key) |
Class<?> |
loadClass(String className)
Loads the specified class using this module's class loader.
|
<T> T |
putAttachment(org.jboss.gravia.resource.AttachmentKey<T> key,
T value) |
<T> T |
removeAttachment(org.jboss.gravia.resource.AttachmentKey<T> key) |
int |
removeServiceInUse(ServiceReference<?> serviceState) |
protected abstract void |
setState(Module.State newState) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDataFile, getModuleContext, getModuleId, getState, start, stop, uninstallpublic static org.jboss.gravia.resource.AttachmentKey<ModuleEntriesProvider> MODULE_ENTRIES_PROVIDER_KEY
protected AbstractModule(AbstractRuntime runtime, ClassLoader classLoader, org.jboss.gravia.resource.Resource resource, Dictionary<String,String> headers)
public static AbstractModule assertAbstractModule(Module module)
protected abstract void setState(Module.State newState)
protected AbstractRuntime getRuntime()
protected ClassLoader getClassLoader()
public org.jboss.gravia.resource.ResourceIdentity getIdentity()
ModulegetIdentity in interface Modulepublic <A> A adapt(Class<A> type)
ModuleRuntimeClassLoaderResourceModuleContextpublic <T> T putAttachment(org.jboss.gravia.resource.AttachmentKey<T> key,
T value)
putAttachment in interface org.jboss.gravia.resource.Attachablepublic <T> T getAttachment(org.jboss.gravia.resource.AttachmentKey<T> key)
getAttachment in interface org.jboss.gravia.resource.Attachablepublic <T> boolean hasAttachment(org.jboss.gravia.resource.AttachmentKey<T> key)
hasAttachment in interface org.jboss.gravia.resource.Attachablepublic <T> T removeAttachment(org.jboss.gravia.resource.AttachmentKey<T> key)
removeAttachment in interface org.jboss.gravia.resource.Attachablepublic Class<?> loadClass(String className) throws ClassNotFoundException
Module
If this module's state is UNINSTALLED, then an
IllegalStateException is thrown.
loadClass in interface ModuleclassName - The name of the class to load.ClassNotFoundExceptionpublic Dictionary<String,String> getHeaders()
ModuleThese values may be mapped to manifest headers, but this is not a requirement. The module's header values do not change durint the lifecycle of the module.
Header names are case-insensitive. The methods of the returned
Dictionary object must operate on header names in a
case-insensitive manner.
This method must continue to return header information while
this module is in the UNINSTALLED state.
getHeaders in interface ModuleDictionary object containing this
module's Manifest headers and values.public URL getEntry(String path)
ModuleThe specified path is always relative to the root of this module and may begin with "/". A path value of "/" indicates the root of this module.
public List<String> getEntryPaths(String path)
ModuleString objects) to
entries within this module whose longest sub-path matches the specified
path. This module's class loader is not used to search for entries. Only
the contents of this module are searched.
The specified path is always relative to the root of this module and may begin with a "/". A path value of "/" indicates the root of this module.
Returned paths indicating subdirectory paths end with a "/". The returned paths are all relative to the root of this module and must not begin with "/".
getEntryPaths in interface Modulepath - The path name for which to return entry paths.String objects).public List<URL> findEntries(String path, String filePattern, boolean recurse)
ModuleURLs for directory entries must have their path end with "/".
findEntries in interface Modulepath - The path name in which to look. The path is always relative
to the root of this module and may begin with "/". A
path value of "/" indicates the root of this module.filePattern - The file name pattern for selecting entries in the
specified path. The pattern is only matched against the last
element of the entry path. If the entry is a directory then the
trailing "/" is not used for pattern matching. Substring
matching is supported, as specified in the Filter specification,
using the wildcard character ("*"). If null is
specified, this is equivalent to "*" and matches all
files.recurse - If true, recurse into subdirectories. Otherwise
only return entries from the specified path.public Set<ServiceReference<?>> getServicesInUseInternal()
public void addServiceInUse(ServiceReference<?> serviceState)
public int removeServiceInUse(ServiceReference<?> serviceState)
protected void assertNotUninstalled()
Copyright © 2015 JBoss by Red Hat. All rights reserved.