public class RestConfig extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DESCRIPTOR_NAME
The default name of the Coherence REST XML descriptor.
|
static String |
DESCRIPTOR_PROPERTY
The name of the system property that can be used to override the
default Coherence REST configuration file .
|
Constructor and Description |
---|
RestConfig(XmlElement xmlConfig)
Construct an instance of RestConfig based on the specified XML element.
|
Modifier and Type | Method and Description |
---|---|
protected 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> |
createAggregatorMap(XmlElement xml)
Create a collection of AggregatorConfig objects from the given XML
configuration.
|
protected Map<String,Class> |
createMarshallerMap(XmlElement xml)
Create a map of REST marshaller classes keyed by media type from the
given XML configuration.
|
protected Collection<ProcessorConfig> |
createProcessorMap(XmlElement xml)
Create a collection of ProcessorConfig objects from the given XML
configuration.
|
protected QueryConfig |
createQueryConfig(XmlElement xml)
Create a map of
QueryConfig objects from the given XML
configuration. |
protected Collection<QueryEngineConfig> |
createQueryEngines(XmlElement xml)
Create a collection of
QueryEngineConfig objects from the given
XML configuration. |
protected Map<String,ResourceConfig> |
createResourceMap(XmlElement xml)
Create a map of ResourceConfig keyed by cache name or alias (if
defined) from the given XML configuration.
|
AggregatorRegistry |
getAggregatorRegistry()
Return the configured aggregator registry.
|
protected ClassLoader |
getContextClassLoader()
Return the context class loader to use.
|
MarshallerRegistry |
getMarshallerRegistry()
Return the configured marshaller registry.
|
ProcessorRegistry |
getProcessorRegistry()
Return the configured processor registry.
|
QueryEngineRegistry |
getQueryEngineRegistry()
Return the configured query engine registry.
|
Map<String,ResourceConfig> |
getResources()
Return a map of configured resources, keyed by cache name or alias.
|
public static final String DESCRIPTOR_NAME
public static final String DESCRIPTOR_PROPERTY
public RestConfig(XmlElement xmlConfig)
xmlConfig
- the XML element that contains the configuration infopublic static RestConfig create()
NOTE: The default REST configuration descriptor can be overridden with the system property.
protected void configure(XmlElement xmlConfig)
This method assumes that the given configuration has been validated against the coherence-rest-config.xsd schema.
xmlConfig
- the XML element that contains the configuration infoprotected Map<String,ResourceConfig> createResourceMap(XmlElement xml)
xml
- the XML configurationprotected Map<String,Class> createMarshallerMap(XmlElement xml)
xml
- the XML configurationprotected QueryConfig createQueryConfig(XmlElement xml)
QueryConfig
objects from the given XML
configuration.xml
- the XML configurationprotected Collection<AggregatorConfig> createAggregatorMap(XmlElement xml)
xml
- the XML configurationprotected Collection<ProcessorConfig> createProcessorMap(XmlElement xml)
xml
- the XML configurationprotected Collection<QueryEngineConfig> createQueryEngines(XmlElement xml)
QueryEngineConfig
objects from the given
XML configuration.xml
- the XML configurationprotected ClassLoader getContextClassLoader()
public Map<String,ResourceConfig> getResources()
public AggregatorRegistry getAggregatorRegistry()
public ProcessorRegistry getProcessorRegistry()
public MarshallerRegistry getMarshallerRegistry()
public QueryEngineRegistry getQueryEngineRegistry()