Openfire 3.5.0 Javadoc

org.jivesoftware.util.log.output
Class AbstractOutputTarget

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

public abstract class AbstractOutputTarget
extends AbstractTarget

Abstract output target. Any new output target that is writing to a single connected resource should extend this class directly or indirectly.

Author:
Peter Donald

Constructor Summary
AbstractOutputTarget()
          Parameterless constructor.
AbstractOutputTarget(Formatter formatter)
           
 
Method Summary
 void close()
          Shutdown target.
protected  void doProcessEvent(LogEvent event)
          Process a log event, via formatting and outputting it.
 Formatter getFormatter()
          Deprecated. Access to formatter is not advised and this method will be removed in future iterations. It remains only for backwards compatability.
protected  void open()
          Startup log session.
protected  void output(String data)
          Deprecated. User should overide send() instead of output(). Output exists for backwards compatability and will be removed in future.
 void setFormatter(Formatter formatter)
          Deprecated. In future this method will become protected access.
protected  void write(String data)
          Abstract method to send data.
 
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

AbstractOutputTarget

public AbstractOutputTarget()
Parameterless constructor.


AbstractOutputTarget

public AbstractOutputTarget(Formatter formatter)
Method Detail

getFormatter

public Formatter getFormatter()
Deprecated. Access to formatter is not advised and this method will be removed in future iterations. It remains only for backwards compatability.

Retrieve the associated formatter.

Returns:
the formatter

setFormatter

public void setFormatter(Formatter formatter)
Deprecated. In future this method will become protected access.

Set the formatter.

Parameters:
formatter - the formatter

write

protected void write(String data)
Abstract method to send data.

Parameters:
data - the data to be output

output

protected void output(String data)
Deprecated. User should overide send() instead of output(). Output exists for backwards compatability and will be removed in future.

Abstract method that will output event.

Parameters:
data - the data to be output

doProcessEvent

protected void doProcessEvent(LogEvent event)
Description copied from class: AbstractTarget
Process a log event, via formatting and outputting it. This should be overidden by subclasses.

Specified by:
doProcessEvent in class AbstractTarget
Parameters:
event - the log event

open

protected void open()
Startup log session.

Overrides:
open in class AbstractTarget

close

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

Overrides:
close in class AbstractTarget

Openfire 3.5.0 Javadoc

Copyright © 2003-2007 Jive Software.