Class RestConfig
java.lang.Object
com.tangosol.coherence.rest.config.RestConfig
The RestConfig class encapsulates information related to Coherence REST
configuration.
- Author:
- vp 2011.07.08
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The default name of the Coherence REST XML descriptor.static final String
The name of the system property that can be used to override the default Coherence REST configuration file "coherence-rest-config.xml". -
Constructor Summary
ConstructorDescriptionRestConfig
(XmlElement xmlConfig) Construct an instance of RestConfig based on the specified XML element. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
configure
(XmlElement xmlConfig) Configures this RestConfig instance using the specified XML element.static RestConfig
create()
Return a singleton instance of RestConfig based on the REST configuration descriptor.protected Collection
<AggregatorConfig> Create a collection of AggregatorConfig objects from the given XML configuration.Create a map of REST marshaller classes keyed by media type from the given XML configuration.protected Collection
<ProcessorConfig> Create a collection of ProcessorConfig objects from the given XML configuration.protected QueryConfig
Create a map ofQueryConfig
objects from the given XML configuration.protected Collection
<QueryEngineConfig> Create a collection ofQueryEngineConfig
objects from the given XML configuration.protected Map
<String, ResourceConfig> Create a map of ResourceConfig keyed by cache name or alias (if defined) from the given XML configuration.Return the configured aggregator registry.protected ClassLoader
Return the context class loader to use.Return the configured marshaller registry.Return the configured processor registry.Return the configured query engine registry.Return a map of configured resources, keyed by cache name or alias.
-
Field Details
-
DESCRIPTOR_NAME
The default name of the Coherence REST XML descriptor.- See Also:
-
DESCRIPTOR_PROPERTY
The name of the system property that can be used to override the default Coherence REST configuration file "coherence-rest-config.xml".- See Also:
-
-
Constructor Details
-
RestConfig
Construct an instance of RestConfig based on the specified XML element.- Parameters:
xmlConfig
- the XML element that contains the configuration info
-
-
Method Details
-
create
Return a singleton instance of RestConfig based on the REST configuration descriptor.NOTE: The default REST configuration descriptor "coherence-rest-config.xml" can be overridden with the "coherence.rest.config" system property.
- Returns:
- REST configuration
-
configure
Configures this RestConfig instance using the specified XML element.This method assumes that the given configuration has been validated against the coherence-rest-config.xsd schema.
- Parameters:
xmlConfig
- the XML element that contains the configuration info
-
createResourceMap
Create a map of ResourceConfig keyed by cache name or alias (if defined) from the given XML configuration.- Parameters:
xml
- the XML configuration- Returns:
- a map of ResourceConfig keyed by cache name or alias
-
createMarshallerMap
Create a map of REST marshaller classes keyed by media type from the given XML configuration.- Parameters:
xml
- the XML configuration- Returns:
- a map of REST marshaller classes keyed by media type
-
createQueryConfig
Create a map ofQueryConfig
objects from the given XML configuration.- Parameters:
xml
- the XML configuration- Returns:
- a map of QueryConfigs, keyed by query name
-
createAggregatorMap
Create a collection of AggregatorConfig objects from the given XML configuration.- Parameters:
xml
- the XML configuration- Returns:
- a collection of AggregatorConfig objects
-
createProcessorMap
Create a collection of ProcessorConfig objects from the given XML configuration.- Parameters:
xml
- the XML configuration- Returns:
- a collection of ProcessorConfig objects
-
createQueryEngines
Create a collection ofQueryEngineConfig
objects from the given XML configuration.- Parameters:
xml
- the XML configuration- Returns:
- a collection of QueryEngineConfig objects
-
getContextClassLoader
Return the context class loader to use.- Returns:
- the context class loader to use
-
getResources
Return a map of configured resources, keyed by cache name or alias.- Returns:
- map of configured resources
-
getAggregatorRegistry
Return the configured aggregator registry.- Returns:
- aggregator registry
-
getProcessorRegistry
Return the configured processor registry.- Returns:
- processor registry
-
getMarshallerRegistry
Return the configured marshaller registry.- Returns:
- marshaller registry
-
getQueryEngineRegistry
Return the configured query engine registry.- Returns:
- query engine registry
-