Module org.elasticsearch.xcore
Class WatcherXContentParser
java.lang.Object
org.elasticsearch.xcontent.FilterXContentParser
org.elasticsearch.xcontent.FilterXContentParserWrapper
org.elasticsearch.xpack.core.watcher.support.xcontent.WatcherXContentParser
- All Implemented Interfaces:
Closeable,AutoCloseable,org.elasticsearch.xcontent.XContentParser
public class WatcherXContentParser
extends org.elasticsearch.xcontent.FilterXContentParserWrapper
A xcontent parser that is used by watcher. This is a special parser that is
aware of watcher services. In particular, it's aware of the used
Clock
and the CryptoService. The former (clock) may be used when the current time
is required during the parse phase of construct. The latter (crypto service) is used
to encode secret values (e.g. passwords, security tokens, etc..) to Secrets.
Secrets are encrypted values that are stored in memory and are decrypted
on demand when needed.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.XContentParser
org.elasticsearch.xcontent.XContentParser.NumberType, org.elasticsearch.xcontent.XContentParser.Token -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWatcherXContentParser(org.elasticsearch.xcontent.XContentParser parser, ZonedDateTime parseTime, CryptoService cryptoService, boolean allowRedactedPasswords) -
Method Summary
Modifier and TypeMethodDescriptionstatic SecretsecretOrNull(org.elasticsearch.xcontent.XContentParser parser) Methods inherited from class org.elasticsearch.xcontent.FilterXContentParserWrapper
delegateMethods inherited from class org.elasticsearch.xcontent.FilterXContentParser
allowDuplicateKeys, binaryValue, booleanValue, charBuffer, charBufferOrNull, close, contentType, currentName, currentToken, doubleValue, doubleValue, floatValue, floatValue, getDeprecationHandler, getRestApiVersion, getTokenLocation, getXContentRegistry, hasTextCharacters, intValue, intValue, isBooleanValue, isClosed, list, listOrderedMap, longValue, longValue, map, map, mapOrdered, mapStrings, namedObject, nextToken, numberType, numberValue, objectBytes, objectText, optimizedText, optimizedTextOrNull, shortValue, shortValue, skipChildren, text, textCharacters, textLength, textOffset, textOrNullMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.XContentParser
nextFieldName
-
Field Details
-
REDACTED_PASSWORD
- See Also:
-
-
Constructor Details
-
WatcherXContentParser
public WatcherXContentParser(org.elasticsearch.xcontent.XContentParser parser, ZonedDateTime parseTime, @Nullable CryptoService cryptoService, boolean allowRedactedPasswords)
-
-
Method Details
-
secretOrNull
public static Secret secretOrNull(org.elasticsearch.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-
getParseDateTime
-