ch.qos.logback.core.encoder
Class ObjectStreamEncoder<E>
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.encoder.EncoderBase<E>
ch.qos.logback.core.encoder.ObjectStreamEncoder<E>
- Type Parameters:
E
-
- All Implemented Interfaces:
- Encoder<E>, ContextAware, LifeCycle
public class ObjectStreamEncoder<E>
- extends EncoderBase<E>
Write out events as java objects.
- Author:
- Ceki Gülcü
Method Summary |
void |
close()
This method is called prior to the closing of the underling
OutputStream . |
void |
doEncode(E event)
Encode and write an event to the appropriate OutputStream . |
void |
init(OutputStream os)
This method is called when the owning appender starts or whenever output
needs to be directed to a new OutputStream, for instance as a result of a
rollover. |
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
START_PEBBLE
public static int START_PEBBLE
STOP_PEBBLE
public static int STOP_PEBBLE
ObjectStreamEncoder
public ObjectStreamEncoder()
doEncode
public void doEncode(E event)
throws IOException
- Description copied from interface:
Encoder
- Encode and write an event to the appropriate
OutputStream
.
Implementations are free to differ writing out of the encoded event and
instead write in batches.
- Throws:
IOException
init
public void init(OutputStream os)
throws IOException
- Description copied from interface:
Encoder
- This method is called when the owning appender starts or whenever output
needs to be directed to a new OutputStream, for instance as a result of a
rollover. Implementing encoders should at the very least remember the
OutputStream passed as argument and use it in future operations.
- Specified by:
init
in interface Encoder<E>
- Overrides:
init
in class EncoderBase<E>
- Throws:
IOException
close
public void close()
throws IOException
- Description copied from interface:
Encoder
- This method is called prior to the closing of the underling
OutputStream
. Implementations MUST not close the underlying
OutputStream
which is the responsibility of the owning appender.
- Throws:
IOException
Copyright © 2005-2012 QOS.ch. All Rights Reserved.