org.apache.logging.log4j.core.net.server
Class InputStreamLogEventBridge

java.lang.Object
  extended by org.apache.logging.log4j.core.net.server.AbstractLogEventBridge<InputStream>
      extended by org.apache.logging.log4j.core.net.server.InputStreamLogEventBridge
All Implemented Interfaces:
LogEventBridge<InputStream>
Direct Known Subclasses:
JsonInputStreamLogEventBridge, XmlInputStreamLogEventBridge

public abstract class InputStreamLogEventBridge
extends AbstractLogEventBridge<InputStream>

Reads and logs LogEvents from an InputStream.


Field Summary
 
Fields inherited from class org.apache.logging.log4j.core.net.server.AbstractLogEventBridge
END, logger
 
Constructor Summary
InputStreamLogEventBridge(com.fasterxml.jackson.databind.ObjectMapper mapper, int bufferSize, Charset charset, String eventEndMarker)
           
 
Method Summary
protected abstract  int[] getEventIndices(String text, int beginIndex)
           
 void logEvents(InputStream inputStream, LogEventListener logEventListener)
          Reads LogEvents from the given input stream and logs them as they are discovered on the given logger.
protected  Log4jLogEvent unmarshal(String jsonEvent)
           
 
Methods inherited from class org.apache.logging.log4j.core.net.server.AbstractLogEventBridge
wrapStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputStreamLogEventBridge

public InputStreamLogEventBridge(com.fasterxml.jackson.databind.ObjectMapper mapper,
                                 int bufferSize,
                                 Charset charset,
                                 String eventEndMarker)
Method Detail

getEventIndices

protected abstract int[] getEventIndices(String text,
                                         int beginIndex)

logEvents

public void logEvents(InputStream inputStream,
                      LogEventListener logEventListener)
               throws IOException
Description copied from interface: LogEventBridge
Reads LogEvents from the given input stream and logs them as they are discovered on the given logger.

Parameters:
inputStream - the input stream to read
logEventListener - TODO
Throws:
IOException

unmarshal

protected Log4jLogEvent unmarshal(String jsonEvent)
                           throws IOException
Throws:
IOException


Copyright © 1999-2014 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.