Event
- type of event (ILoggingEvent
or IAccessEvent
).public abstract class CompositeJsonFormatter<Event extends DeferredProcessingAware> extends ContextAwareBase implements LifeCycle
JsonProvider
s.
The CompositeJsonFormatter
starts the JSON object ('{'),
then delegates writing the contents of the object to the JsonProvider
s,
and then ends the JSON object ('}').
context
Constructor and Description |
---|
CompositeJsonFormatter(ContextAware declaredOrigin) |
Modifier and Type | Method and Description |
---|---|
String |
getEncoding() |
JsonFactory |
getJsonFactory() |
JsonFactoryDecorator |
getJsonFactoryDecorator() |
JsonGeneratorDecorator |
getJsonGeneratorDecorator() |
JsonProviders<Event> |
getProviders() |
boolean |
isFindAndRegisterJacksonModules() |
boolean |
isStarted() |
protected void |
prepareForDeferredProcessing(Event event) |
void |
setEncoding(String encodingName) |
void |
setFindAndRegisterJacksonModules(boolean findAndRegisterJacksonModules) |
void |
setJsonFactoryDecorator(JsonFactoryDecorator jsonFactoryDecorator) |
void |
setJsonGeneratorDecorator(JsonGeneratorDecorator jsonGeneratorDecorator) |
void |
setProviders(JsonProviders<Event> jsonProviders) |
void |
start() |
void |
stop() |
byte[] |
writeEventAsBytes(Event event) |
String |
writeEventAsString(Event event) |
protected void |
writeEventToGenerator(JsonGenerator generator,
Event event) |
void |
writeEventToOutputStream(Event event,
OutputStream outputStream) |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
public CompositeJsonFormatter(ContextAware declaredOrigin)
public byte[] writeEventAsBytes(Event event) throws IOException
IOException
public void writeEventToOutputStream(Event event, OutputStream outputStream) throws IOException
IOException
public String writeEventAsString(Event event) throws IOException
IOException
protected void writeEventToGenerator(JsonGenerator generator, Event event) throws IOException
IOException
protected void prepareForDeferredProcessing(Event event)
public JsonFactory getJsonFactory()
public JsonFactoryDecorator getJsonFactoryDecorator()
public void setJsonFactoryDecorator(JsonFactoryDecorator jsonFactoryDecorator)
public JsonGeneratorDecorator getJsonGeneratorDecorator()
public void setJsonGeneratorDecorator(JsonGeneratorDecorator jsonGeneratorDecorator)
public JsonProviders<Event> getProviders()
public String getEncoding()
public void setEncoding(String encodingName)
public void setProviders(JsonProviders<Event> jsonProviders)
public boolean isFindAndRegisterJacksonModules()
public void setFindAndRegisterJacksonModules(boolean findAndRegisterJacksonModules)
Copyright © 2019. All rights reserved.