S
- a type of data stampChangeable<S>
, ConfigSource
, Source<S>
, java.lang.AutoCloseable
, java.util.function.Supplier<S>
public abstract class AbstractParsableConfigSource<S> extends AbstractConfigSource<S>
ConfigSource
that uses a
ConfigParser
to parse
configuration content
accessible as a
Readable
.
Typically concrete implementations will extend this class in order to
delegate to ConfigParser
the loading of configuration content into an
ConfigNode.ObjectNode
representing the hierarchical structure of the configuration.
AbstractParsableConfigSource.Builder
Modifier and Type | Class | Description |
---|---|---|
static class |
AbstractParsableConfigSource.Builder<B extends AbstractParsableConfigSource.Builder<B,T>,T> |
Common
AbstractParsableConfigSource Builder, suitable for
concrete implementations of Builder that are related to
ConfigSource s which extend AbstractParsableConfigSource |
AbstractSource.Data<D,S>
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractParsableConfigSource(AbstractParsableConfigSource.Builder builder) |
Initializes config source from builder.
|
Modifier and Type | Method | Description |
---|---|---|
protected abstract ConfigParser.Content<S> |
content() |
Returns config source content.
|
protected java.lang.String |
getMediaType() |
Returns source associated media type or
null if unknown. |
protected ConfigParser |
getParser() |
Returns source associated parser or
null if unknown. |
protected AbstractSource.Data<ConfigNode.ObjectNode,S> |
loadData() |
Loads new data from config source.
|
changes, getConfigContext, init, processLoadedData
dataStamp, description, fireChangeEvent, isMandatory, load, uid
from, get
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, description, load
protected AbstractParsableConfigSource(AbstractParsableConfigSource.Builder builder)
builder
- builder to be initialized fromprotected AbstractSource.Data<ConfigNode.ObjectNode,S> loadData()
AbstractSource
loadData
in class AbstractSource<ConfigNode.ObjectNode,S>
protected java.lang.String getMediaType()
null
if unknown.null
if unknown.protected ConfigParser getParser()
null
if unknown.null
if unknown.protected abstract ConfigParser.Content<S> content() throws ConfigException
null
.ConfigException
- in case of loading of configuration from config source failed.Copyright © 2018 Oracle Corporation. All rights reserved.