public class OfficeServletContextManagedObjectSource extends AbstractManagedObjectSource<OfficeServletContextManagedObjectSource.DependencyKeys,None> implements CoordinatingManagedObject<OfficeServletContextManagedObjectSource.DependencyKeys>
ManagedObjectSource
for the OfficeServletContext
.Modifier and Type | Class and Description |
---|---|
static class |
OfficeServletContextManagedObjectSource.DependencyKeys
Dependency keys for the
OfficeServletContextManagedObjectSource . |
AbstractAsyncManagedObjectSource.DependencyLabeller, AbstractAsyncManagedObjectSource.Labeller, AbstractAsyncManagedObjectSource.MetaDataContext<D extends Enum<D>,F extends Enum<F>>, AbstractAsyncManagedObjectSource.SpecificationContext
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_FILTER_INSTANCE_INIT_PREFIX
Prefix on property name to obtain Init Parameter name and its
corresponding value.
|
static String |
PROPERTY_FILTER_INSTANCE_NAME_PREFIX
|
static String |
PROPERTY_FILTER_MAPPING_INDEX_PREFIX
Prefix on property name to obtain the
FilterMapping index and its
corresponding Filter name. |
static String |
PROPERTY_FILTER_MAPPING_SERVLET_PREFIX
Prefix on property name to obtain the
FilterMapping
Servlet name. |
static String |
PROPERTY_FILTER_MAPPING_TYPE_PREFIX
Prefix on property name to obtain the
FilterMapping
MappingType . |
static String |
PROPERTY_FILTER_MAPPING_URL_PREFIX
Prefix on property name to obtain the
FilterMapping URL pattern. |
static String |
PROPERTY_PREFIX_FILE_EXTENSION_TO_MIME_TYPE
Property prefix to file extension to MIME type mapping.
|
static String |
PROPERTY_PREFIX_INIT_PARAMETER
Property prefix to an init parameter.
|
static String |
PROPERTY_SERVLET_CONTEXT_NAME
Property name to specify the
ServletContext name. |
Constructor and Description |
---|
OfficeServletContextManagedObjectSource() |
Modifier and Type | Method and Description |
---|---|
protected ManagedObject |
getManagedObject()
Synchronously obtains the
ManagedObject . |
Object |
getObject()
Obtains the object being managed.
|
Map<String,String> |
loadMappings(String prefix,
ManagedObjectSourceContext<None> context,
Map<String,String> mappings)
Extracts the mapping from the
ManagedObjectSourceContext . |
protected void |
loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<OfficeServletContextManagedObjectSource.DependencyKeys,None> context)
Overridden to load meta-data.
|
void |
loadObjects(ObjectRegistry<OfficeServletContextManagedObjectSource.DependencyKeys> registry)
Loads the Objects of the
ManagedObject instances to be referenced
by this CoordinatingManagedObject . |
protected void |
loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
Overridden to load specifications.
|
sourceManagedObject
getMetaData, getSpecification, init, start, stop
public static final String PROPERTY_SERVLET_CONTEXT_NAME
ServletContext
name.public static final String PROPERTY_PREFIX_INIT_PARAMETER
public static final String PROPERTY_PREFIX_FILE_EXTENSION_TO_MIME_TYPE
public static final String PROPERTY_FILTER_INSTANCE_NAME_PREFIX
public static final String PROPERTY_FILTER_INSTANCE_INIT_PREFIX
public static final String PROPERTY_FILTER_MAPPING_INDEX_PREFIX
FilterMapping
index and its
corresponding Filter
name.public static final String PROPERTY_FILTER_MAPPING_URL_PREFIX
FilterMapping
URL pattern.public static final String PROPERTY_FILTER_MAPPING_SERVLET_PREFIX
FilterMapping
Servlet
name.public static final String PROPERTY_FILTER_MAPPING_TYPE_PREFIX
FilterMapping
MappingType
.public OfficeServletContextManagedObjectSource()
public Map<String,String> loadMappings(String prefix, ManagedObjectSourceContext<None> context, Map<String,String> mappings)
ManagedObjectSourceContext
.prefix
- Prefix of properties with remaining being the key.context
- ManagedObjectSourceContext
.mappings
- Mappings to be loaded..protected void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
AbstractAsyncManagedObjectSource
loadSpecification
in class AbstractAsyncManagedObjectSource<OfficeServletContextManagedObjectSource.DependencyKeys,None>
context
- Specifications.protected void loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<OfficeServletContextManagedObjectSource.DependencyKeys,None> context) throws Exception
AbstractAsyncManagedObjectSource
loadMetaData
in class AbstractAsyncManagedObjectSource<OfficeServletContextManagedObjectSource.DependencyKeys,None>
context
- Meta-data.Exception
- If fails to load the meta-data.protected ManagedObject getManagedObject() throws Throwable
AbstractManagedObjectSource
ManagedObject
.getManagedObject
in class AbstractManagedObjectSource<OfficeServletContextManagedObjectSource.DependencyKeys,None>
ManagedObject
.Throwable
- If fails to obtain the ManagedObject
.public void loadObjects(ObjectRegistry<OfficeServletContextManagedObjectSource.DependencyKeys> registry) throws Throwable
CoordinatingManagedObject
Loads the Objects of the ManagedObject
instances to be referenced
by this CoordinatingManagedObject
.
References to the loaded Objects must be released on recycling the
ManagedObject
.
loadObjects
in interface CoordinatingManagedObject<OfficeServletContextManagedObjectSource.DependencyKeys>
registry
- Registry of the Objects for the ManagedObject
instances.Throwable
- Should this CoordinatingManagedObject
fail to load
the ManagedObject
.public Object getObject() throws Throwable
ManagedObject
getObject
in interface ManagedObject
Throwable
- Indicating failed to obtain the object for use.Copyright © 2005–2016. All rights reserved.