T - the configuration data type returned by this Sourcepublic interface Source<T>
A Source is an object that basically defines the configuration input (e.g.:
file, URL) and contains built-in logic for data access.
| Modifier and Type | Method and Description |
|---|---|
T |
load(Mapper<T> mapper)
Applies a specific configuration loading strategy and returns a mapped bean containing
the retrieved data, throwing an exception if the operation fails.
|
T |
load(Mapper<T> mapper,
boolean optional)
Applies a specific configuration loading strategy and returns a mapped bean containing
the retrieved data.
|
T load(Mapper<T> mapper)
mapper - the Mapper to be applied on the source input streamConfigurationSourceException - in an event of failure to load the configuration
sourceT load(Mapper<T> mapper, boolean optional)
optional parameter is true and the operation
fails, this method returns null.mapper - the Mapper to be applied on the source input streamoptional - a flag indicating whether or not an exception should be thrown in an
event of failure to load the configuration sourcenull in an event of failure if the
optional flag set as trueConfigurationSourceException - in an event of failure to load the configuration
source (only if the optional flag set as
false)Copyright © 2022. All rights reserved.