|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.util.logging.AsynchLogWriter
public class AsynchLogWriter
allows to operate any LogWriter asynchronously.
| Field Summary |
|---|
| Fields inherited from interface com.antelmann.util.Filter |
|---|
EXCLUDE_ALL_FILTER, INCLUDE_ALL_FILTER |
| Constructor Summary | |
|---|---|
AsynchLogWriter(LogWriter writer,
Executor worker)
|
|
| Method Summary | |
|---|---|
boolean |
accept(LogEntry entry)
delegates to the writer synchronously |
LogException[] |
clearExceptions()
returns all exceptions that may have been accumulated until this call and clears the embedded list |
Executor |
getExecutor()
|
LogWriter |
getWriter()
|
LogWriter |
unwrap()
returns the embedded instance that this wrapper encloses |
void |
write(LogEntry entry)
creates a task that runs asynchronously and delegates to the embedded writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AsynchLogWriter(LogWriter writer,
Executor worker)
| Method Detail |
|---|
public boolean accept(LogEntry entry)
accept in interface Filter<LogEntry>
public void write(LogEntry entry)
throws LogException
write in interface LogWriterLogException - if an error occurred while writing the logpublic Executor getExecutor()
public LogWriter getWriter()
public LogWriter unwrap()
Wrapped
unwrap in interface Wrapped<LogWriter>public LogException[] clearExceptions()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||