Event - type of event (ILoggingEvent or IAccessEvent).public abstract class CompositeJsonFormatter<Event extends DeferredProcessingAware> extends ContextAwareBase implements LifeCycle
JsonProviders.
The CompositeJsonFormatter starts the JSON object ('{'),
then delegates writing the contents of the object to the JsonProviders,
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, setContextpublic CompositeJsonFormatter(ContextAware declaredOrigin)
public byte[] writeEventAsBytes(Event event) throws IOException
IOExceptionpublic void writeEventToOutputStream(Event event, OutputStream outputStream) throws IOException
IOExceptionpublic String writeEventAsString(Event event) throws IOException
IOExceptionprotected void writeEventToGenerator(JsonGenerator generator, Event event) throws IOException
IOExceptionprotected 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 © 2020. All rights reserved.