Class AbstractJsonProvider<Event extends DeferredProcessingAware>
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
net.logstash.logback.composite.AbstractJsonProvider<Event>
- Type Parameters:
Event- type of event (ILoggingEventorIAccessEvent).
- All Implemented Interfaces:
ContextAware, JsonProvider<Event>
- Direct Known Subclasses:
AbstractFieldJsonProvider, AbstractPatternJsonProvider, GlobalCustomFieldsJsonProvider, LogstashMarkersJsonProvider
public abstract class AbstractJsonProvider<Event extends DeferredProcessingAware>
extends ContextAwareBase
implements JsonProvider<Event>
Base
JsonProvider that provides default implementations for standard methods.-
Field Summary
Fields inherited from class ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAssert the component is started and throwIllegalStateExceptionif notbooleanReport whether the provider is started or not.voidGives the provider a chance to perform more deferred processing (in addition to what is already provided byDeferredProcessingAware.prepareForDeferredProcessing()).voidstart()Start the provider after all configuration properties are set.voidstop()Stop the providerMethods inherited from class ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContextMethods inherited from interface JsonProvider
writeTo
-
Constructor Details
-
AbstractJsonProvider
public AbstractJsonProvider()
-
-
Method Details
-
start
public void start()Description copied from interface:JsonProviderStart the provider after all configuration properties are set.- Specified by:
startin interfaceJsonProvider<Event extends DeferredProcessingAware>
-
stop
public void stop()Description copied from interface:JsonProviderStop the provider- Specified by:
stopin interfaceJsonProvider<Event extends DeferredProcessingAware>
-
isStarted
public boolean isStarted()Description copied from interface:JsonProviderReport whether the provider is started or not.- Specified by:
isStartedin interfaceJsonProvider<Event extends DeferredProcessingAware>- Returns:
trueif the provider is started,falseotherwise.
-
prepareForDeferredProcessing
Description copied from interface:JsonProviderGives the provider a chance to perform more deferred processing (in addition to what is already provided byDeferredProcessingAware.prepareForDeferredProcessing()).- Specified by:
prepareForDeferredProcessingin interfaceJsonProvider<Event extends DeferredProcessingAware>- Parameters:
event- the event to prepare for deferred processing
-
assertIsStarted
protected void assertIsStarted()Assert the component is started and throwIllegalStateExceptionif not- Throws:
IllegalStateException- if component is not started
-