|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.acelogger.appender.BaseAppender
public abstract class BaseAppender
Abstracts all common tasks for Appender
.
Constructor Summary | |
---|---|
BaseAppender(String identifier)
Constructs a new BaseAppender using the supplied identifier, an empty formatter, and an empty executor manager. |
|
BaseAppender(String identifier,
Formatter formatter,
ExecutorManager executor)
Constructs a new BaseAppender using the supplied identifier, formatter, and executor manager. |
|
BaseAppender(String identifier,
Formatter formatter,
ExecutorManager executor,
LevelFilter threshold)
Constructs a new BaseAppender using the supplied identifier, formatter, and executor manager. |
Method Summary | |
---|---|
void |
appendFooter()
Appends a footer to this appender. |
protected Runnable |
appendFooterProcess()
Defines the process used to append a footer to this appender. |
void |
appendHeader()
Appends a header to this appender. |
protected Runnable |
appendHeaderProcess()
Defines the process used to append a header to this appender. |
void |
appendLog(LogEvent call)
Appends a log call using this appender. |
protected abstract Runnable |
appendLogProcess(LogEvent call)
Defines the process used to append a log call. |
void |
close()
This method is responsible for termination and deallocation of any resource used by this appender. |
protected Runnable |
closeProcess()
Defines the process used to close this appender. |
protected String |
formatLogCall(LogEvent call)
Formats a log call based on the Formatter used by this appender. |
ExecutorManager |
getExecutor()
Sets the executor manager used within this appender. |
Formatter |
getFormatter()
Returns the formatter used within this appender. |
String |
getIdentifier()
Gets a String that identifies this object. |
LevelFilter |
getThreshold()
Gets the threshold of this appender. |
protected void |
initialize()
This method is responsible for calling the needed methods after the Appender construction, this includes opening, appending the header, and registering the call to append the footer and close the file. |
void |
open()
This method is responsible for allocation and preparation of any resource used by this appender. |
protected Runnable |
openProcess()
Defines the process used to open this appender. |
void |
setThreshold(LevelFilter threshold)
Sets the threshold of this appender. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseAppender(String identifier)
identifier
- A string that identifies this appender.public BaseAppender(String identifier, Formatter formatter, ExecutorManager executor)
identifier
- A string that identifies this appender.formatter
- The Formatter
that will be used within this appender.executor
- The ExecutorManager
that will be used within this appender.public BaseAppender(String identifier, Formatter formatter, ExecutorManager executor, LevelFilter threshold)
identifier
- A string that identifies this appender.formatter
- The Formatter
that will be used within this appender.executor
- The ExecutorManager
that will be used within this appender.threshold
- The filter used to determine if the call should be appended or not.Method Detail |
---|
protected abstract Runnable appendLogProcess(LogEvent call)
call
- The call that will be logged.
protected Runnable appendHeaderProcess()
protected Runnable appendFooterProcess()
protected Runnable openProcess()
protected Runnable closeProcess()
protected final void initialize()
public final void appendFooter()
appendFooter
in interface Appender
public final void appendHeader()
appendHeader
in interface Appender
public final void close()
close
in interface Appender
public final void open()
open
in interface Appender
public final void appendLog(LogEvent call)
appendLog
in interface Appender
call
- The log call to be appended.public final Formatter getFormatter()
Formatter
used within this appender.public final LevelFilter getThreshold()
public final void setThreshold(LevelFilter threshold)
threshold
- The filter used to determine if the call should be appended or not.public final ExecutorManager getExecutor()
ExecutorManager
used within this appender.public final String getIdentifier()
getIdentifier
in interface Identifiable
protected final String formatLogCall(LogEvent call)
Formatter
used by this appender.
call
- The log call to be formatted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |