public class LayoutWrappingEncoder<E> extends EncoderBase<E>
Modifier and Type | Field and Description |
---|---|
protected Layout<E> |
layout |
started
context
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 |
isImmediateFlush() |
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 |
start() |
void |
stop() |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
public void setImmediateFlush(boolean immediateFlush)
public boolean isImmediateFlush()
public Charset getCharset()
public void setCharset(Charset charset)
null which corresponds to
the system's default charset.
charset
- public byte[] headerBytes()
Encoder
public byte[] footerBytes()
Encoder
public byte[] encode(E event)
Encoder
public boolean isStarted()
isStarted
in interface LifeCycle
isStarted
in class EncoderBase<E>
public void start()
start
in interface LifeCycle
start
in class EncoderBase<E>
public void stop()
stop
in interface LifeCycle
stop
in class EncoderBase<E>
Copyright © 2005–2017 QOS.ch. All rights reserved.