Package io.helidon.config.spi
Interface ConfigParser.Content<S>
-
- Type Parameters:
S- a type of data stamp
- Enclosing interface:
- ConfigParser
public static interface ConfigParser.Content<S>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T extends Readable & AutoCloseable>
TasReadable()Returns aReadablethat is use to read configuration content from.default voidclose()static <S> ConfigParser.Content<S>create(Readable readable, String mediaType, Optional<S> stamp)CreatesConfigParser.Contentfrom givenreadable contentand with specifiedmediaTypeof configuration format.StringmediaType()Returns configuration content media type.default Optional<S>stamp()A modification stamp of the content.
-
-
-
Method Detail
-
close
default void close() throws ConfigException- Throws:
ConfigException
-
stamp
default Optional<S> stamp()
A modification stamp of the content.Default implementation returns
Instant.EPOCH.- Returns:
- a stamp of the content
-
mediaType
String mediaType()
Returns configuration content media type.- Returns:
- content media type
-
asReadable
<T extends Readable & AutoCloseable> T asReadable()
Returns aReadablethat is use to read configuration content from.- Type Parameters:
T- return type that isReadableas well asAutoCloseable- Returns:
- a content as
Readable
-
create
static <S> ConfigParser.Content<S> create(Readable readable, String mediaType, Optional<S> stamp)
CreatesConfigParser.Contentfrom givenreadable contentand with specifiedmediaTypeof configuration format.- Type Parameters:
S- a type of data stamp- Parameters:
readable- a readable providing configuration. If it implementsAutoCloseableit is automatically closed whenever parsed.mediaType- a configuration mediaTypestamp- content stamp- Returns:
- a config content
-
-