Class BaseJsonNodeSource
java.lang.Object
com.arpnetworking.configuration.jackson.BaseJsonNodeSource
- All Implemented Interfaces:
JsonNodeSource
- Direct Known Subclasses:
HoconFileSource
,JsonNodeDirectorySource
,JsonNodeFileSource
,JsonNodeLiteralSource
,JsonNodePaginatedUriSource
,JsonNodeUriSource
Abstract base class for
JsonNodeSource
implementations.- Author:
- Ville Koskela (ville dot koskela at inscopemetrics dot io)
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
BaseJsonNodeSource.Builder<T extends BaseJsonNodeSource.Builder<?,
?>, S extends JsonNodeSource> Builder
implementation forBaseJsonNodeSource
. -
Field Summary
Modifier and TypeFieldDescriptionprotected final com.fasterxml.jackson.databind.ObjectMapper
-
Constructor Summary
ModifierConstructorDescriptionprotected
BaseJsonNodeSource
(BaseJsonNodeSource.Builder<?, ?> builder) Protected constructor. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.arpnetworking.configuration.jackson.JsonNodeSource
getValue
-
Field Details
-
_objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper _objectMapper
-
-
Constructor Details
-
BaseJsonNodeSource
Protected constructor.- Parameters:
builder
- Instance ofBaseJsonNodeSource.Builder
.
-
-
Method Details
-
toLogValue
Generate a Steno log compatible representation.- Returns:
- Steno log compatible representation.
-
toString
-
getValue
protected static Optional<com.fasterxml.jackson.databind.JsonNode> getValue(Optional<com.fasterxml.jackson.databind.JsonNode> node, String... keys) Find theJsonNode
if one exists from a specified root node given a sequence of keys to look-up.- Parameters:
node
- The rootJsonNode
.keys
- The sequence of keys to search for.- Returns:
- The
Optional
JsonNode
instance.
-