|
JBoss Log Manager 1.2.0.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.logging.Handler
org.jboss.logmanager.ExtHandler
org.jboss.logmanager.handlers.AsyncHandler
public class AsyncHandler
An asynchronous log handler which is used to write to a handler or group of handlers which are "slow" or introduce some degree of latency.
| Nested Class Summary | |
|---|---|
static class |
AsyncHandler.OverflowAction
|
| Field Summary |
|---|
| Fields inherited from class org.jboss.logmanager.ExtHandler |
|---|
handlers, handlersUpdater |
| Constructor Summary | |
|---|---|
AsyncHandler()
Construct a new instance. |
|
AsyncHandler(int queueLength)
Construct a new instance. |
|
AsyncHandler(int queueLength,
ThreadFactory threadFactory)
Construct a new instance. |
|
AsyncHandler(ThreadFactory threadFactory)
Construct a new instance. |
|
| Method Summary | |
|---|---|
void |
close()
|
protected void |
doPublish(ExtLogRecord record)
Do the actual work of publication; the record will have been filtered already. |
void |
flush()
|
AsyncHandler.OverflowAction |
getOverflowAction()
Get the overflow action. |
void |
setOverflowAction(AsyncHandler.OverflowAction overflowAction)
Set the overflow action. |
| Methods inherited from class org.jboss.logmanager.ExtHandler |
|---|
addHandler, checkAccess, clearHandlers, getHandlers, isAutoFlush, publish, publish, removeHandler, setAutoFlush, setHandlers |
| Methods inherited from class java.util.logging.Handler |
|---|
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AsyncHandler(int queueLength,
ThreadFactory threadFactory)
queueLength - the queue lengththreadFactory - the thread factory to use to construct the handler threadpublic AsyncHandler(ThreadFactory threadFactory)
threadFactory - the thread factory to use to construct the handler threadpublic AsyncHandler(int queueLength)
queueLength - the queue lengthpublic AsyncHandler()
| Method Detail |
|---|
public AsyncHandler.OverflowAction getOverflowAction()
public void setOverflowAction(AsyncHandler.OverflowAction overflowAction)
overflowAction - the overflow actionprotected void doPublish(ExtLogRecord record)
autoFlush property is set to true; if this behavior is to be
preserved in a subclass then this method should be called after the record is physically written.
doPublish in class ExtHandlerrecord - the log record to publishpublic void flush()
flush in interface Flushableflush in class Handler
public void close()
throws SecurityException
close in interface Closeableclose in class HandlerSecurityException
|
JBoss Log Manager 1.2.0.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||