public class LayoutWrappingEncoder<E> extends EncoderBase<E>
| Modifier and Type | Field and Description |
|---|---|
protected Layout<E> |
layout |
startedcontext| Constructor and Description |
|---|
LayoutWrappingEncoder() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
encode(E event)
Encode an event as bytes.
|
byte[] |
footerBytes()
Get footer bytes.
|
Charset |
getCharset() |
Layout<E> |
getLayout() |
byte[] |
headerBytes()
Get header bytes.
|
boolean |
isStarted() |
void |
setCharset(Charset charset)
Set the charset to use when converting the string returned by the layout
into bytes.
|
void |
setImmediateFlush(boolean immediateFlush)
Sets the immediateFlush option.
|
void |
setLayout(Layout<E> layout) |
void |
setParent(ContextAware parent)
This method allows RollingPolicy implementations to be aware of their
containing appender.
|
void |
start() |
void |
stop() |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContextpublic Charset getCharset()
public void setCharset(Charset charset)
null which corresponds to
the system's default charset.charset - public void setImmediateFlush(boolean immediateFlush)
public byte[] headerBytes()
Encoderpublic byte[] footerBytes()
Encoderpublic byte[] encode(E event)
Encoderpublic boolean isStarted()
isStarted in interface LifeCycleisStarted in class EncoderBase<E>public void start()
start in interface LifeCyclestart in class EncoderBase<E>public void stop()
stop in interface LifeCyclestop in class EncoderBase<E>public void setParent(ContextAware parent)
parent - Copyright © 2005–2021 QOS.ch. All rights reserved.