S
- a type of data stampChangeable<S>
, ConfigSource
, Source<S>
, java.lang.AutoCloseable
, java.util.function.Supplier<S>
AbstractParsableConfigSource
public abstract class AbstractConfigSource<S> extends AbstractSource<ConfigNode.ObjectNode,S> implements ConfigSource
ConfigSource
, suitable for concrete
implementations to extend.AbstractConfigSource.Builder
Modifier and Type | Class | Description |
---|---|---|
static class |
AbstractConfigSource.Builder<B extends AbstractConfigSource.Builder<B,T>,T> |
A common
ConfigSource builder ready to be extended by builder implementation related to ConfigSource
extensions. |
AbstractSource.Data<D,S>
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractConfigSource(AbstractConfigSource.Builder<?,?> builder) |
Initializes config source from builder.
|
Modifier and Type | Method | Description |
---|---|---|
io.helidon.common.reactive.Flow.Publisher<java.util.Optional<ConfigNode.ObjectNode>> |
changes() |
Returns a
Flow.Publisher to which the caller can subscribe in
order to receive change notifications. |
protected ConfigContext |
getConfigContext() |
|
void |
init(ConfigContext context) |
Initialize the config source with a
ConfigContext . |
protected AbstractSource.Data<ConfigNode.ObjectNode,S> |
processLoadedData(AbstractSource.Data<ConfigNode.ObjectNode,S> data) |
Performs any postprocessing of config data after loading.
|
dataStamp, description, fireChangeEvent, isMandatory, load, loadData, uid
from, get
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, description, load
protected AbstractConfigSource(AbstractConfigSource.Builder<?,?> builder)
builder
- builder to be initialized frompublic final void init(ConfigContext context)
ConfigSource
ConfigContext
.
The method is executed during Config
bootstrapping by Config.Builder
.
init
in interface ConfigSource
context
- a config contextprotected ConfigContext getConfigContext()
protected AbstractSource.Data<ConfigNode.ObjectNode,S> processLoadedData(AbstractSource.Data<ConfigNode.ObjectNode,S> data)
AbstractSource
Data
.processLoadedData
in class AbstractSource<ConfigNode.ObjectNode,S>
data
- an input datapublic final io.helidon.common.reactive.Flow.Publisher<java.util.Optional<ConfigNode.ObjectNode>> changes()
Flow.Publisher
to which the caller can subscribe in
order to receive change notifications.
Method Flow.Subscriber.onError(Throwable)
is called in case of error listening on config source data.
Method Flow.Subscriber.onComplete()
is never called.
All subscribers are notified using specified executor
.
Copyright © 2018 Oracle Corporation. All rights reserved.