Interface TemplateResolver<V>
- All Known Subinterfaces:
EventResolver,StackTraceResolver
- All Known Implementing Classes:
CaseConverterResolver,CounterResolver,EndOfBatchResolver,ExceptionResolver,ExceptionRootCauseResolver,LevelResolver,LoggerResolver,MainMapResolver,MapResolver,MarkerResolver,MessageParameterResolver,MessageResolver,PatternResolver,ReadOnlyStringMapResolver,SourceResolver,StackTraceElementResolver,StackTraceObjectResolver,StackTraceStringResolver,TemplateResolvers.UnresolvableTemplateResolver,ThreadContextDataResolver,ThreadContextStackResolver,ThreadResolver,TimestampResolver,TimestampResolver.EpochResolver,TimestampResolver.PatternResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanIndicates if the resolution should be appended to the parent JSON object.default booleanIndicates if the resolver if applicable at all.default booleanisResolvable(V value) Indicates if the resolver if applicable for the givenvalue.voidresolve(V value, JsonWriter jsonWriter) Resolves the givenvalueusing the providedJsonWriter.default voidresolve(V value, JsonWriter jsonWriter, boolean succeedingEntry) Resolves the givenvalueusing the providedJsonWriter.
-
Method Details
-
isFlattening
default boolean isFlattening()Indicates if the resolution should be appended to the parent JSON object.For instance,
ThreadContextDataResolver, i.e., MDC resolver, uses this flag to indicate whether the contents should be appended to the parent JSON object or not. -
isResolvable
default boolean isResolvable()Indicates if the resolver if applicable at all.For instance, the source line resolver can be short-circuited using this check if the location information is disabled in the layout configuration.
-
isResolvable
Indicates if the resolver if applicable for the givenvalue.For instance, the stack trace resolver can be short-circuited using this check if the stack traces are disabled in the layout configuration.
-
resolve
Resolves the givenvalueusing the providedJsonWriter. -
resolve
Resolves the givenvalueusing the providedJsonWriter.- Parameters:
succeedingEntry- false, if this is the first element in a collection; true, otherwise
-