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 aReadable
that is use to read configuration content from.default void
close()
static <S> ConfigParser.Content<S>
create(Readable readable, String mediaType, Optional<S> stamp)
CreatesConfigParser.Content
from givenreadable content
and with specifiedmediaType
of configuration format.String
mediaType()
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 aReadable
that is use to read configuration content from.- Type Parameters:
T
- return type that isReadable
as well asAutoCloseable
- Returns:
- a content as
Readable
-
create
static <S> ConfigParser.Content<S> create(Readable readable, String mediaType, Optional<S> stamp)
CreatesConfigParser.Content
from givenreadable content
and with specifiedmediaType
of configuration format.- Type Parameters:
S
- a type of data stamp- Parameters:
readable
- a readable providing configuration. If it implementsAutoCloseable
it is automatically closed whenever parsed.mediaType
- a configuration mediaTypestamp
- content stamp- Returns:
- a config content
-
-