Openfire 3.6.3 Javadoc

org.jivesoftware.util.log.output.io
Class WriterTarget

java.lang.Object
  extended by org.jivesoftware.util.log.output.AbstractTarget
      extended by org.jivesoftware.util.log.output.AbstractOutputTarget
          extended by org.jivesoftware.util.log.output.io.WriterTarget
All Implemented Interfaces:
ErrorAware, LogTarget

public class WriterTarget
extends AbstractOutputTarget

This target outputs to a writer.

Author:
Peter Donald

Constructor Summary
WriterTarget(Writer writer, Formatter formatter)
          Construct target with a specific writer and formatter.
 
Method Summary
 void close()
          Shutdown target.
protected  void setWriter(Writer writer)
          Set the writer.
protected  void shutdownWriter()
          Shutdown Writer.
protected  void write(String data)
          Concrete implementation of output that writes out to underlying writer.
 
Methods inherited from class org.jivesoftware.util.log.output.AbstractOutputTarget
doProcessEvent, getFormatter, open, output, setFormatter
 
Methods inherited from class org.jivesoftware.util.log.output.AbstractTarget
error, getErrorHandler, isOpen, processEvent, setErrorHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriterTarget

public WriterTarget(Writer writer,
                    Formatter formatter)
Construct target with a specific writer and formatter.

Parameters:
writer - the writer
formatter - the formatter
Method Detail

setWriter

protected void setWriter(Writer writer)
Set the writer. Close down writer and send tail if appropriate.

Parameters:
writer - the new writer

write

protected void write(String data)
Concrete implementation of output that writes out to underlying writer.

Overrides:
write in class AbstractOutputTarget
Parameters:
data - the data to output

close

public void close()
Shutdown target. Attempting to send to target after close() will cause errors to be logged.

Overrides:
close in class AbstractOutputTarget

shutdownWriter

protected void shutdownWriter()
Shutdown Writer.


Openfire 3.6.3 Javadoc

Copyright © 2003-2008 Jive Software.