|
JBoss Log Manager 1.4.0.Beta1 | |||||||||
| 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()
Close all child handlers. |
protected void |
doPublish(ExtLogRecord record)
Do the actual work of publication; the record will have been filtered already. |
AsyncHandler.OverflowAction |
getOverflowAction()
Get the overflow action. |
int |
getQueueLength()
The full size of the queue. |
void |
setOverflowAction(AsyncHandler.OverflowAction overflowAction)
Set the overflow action. |
| Methods inherited from class org.jboss.logmanager.ExtHandler |
|---|
addHandler, checkAccess, checkAccess, clearHandlers, disableAccess, enableAccess, flush, getHandlers, isAutoFlush, isEnabled, protect, publish, publish, removeHandler, setAutoFlush, setEnabled, setEncoding, setErrorManager, setFilter, setFormatter, setHandlers, setLevel, unprotect |
| Methods inherited from class java.util.logging.Handler |
|---|
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError |
| 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 int getQueueLength()
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 publish
public void close()
throws SecurityException
close in interface Closeableclose in class ExtHandlerSecurityException
|
JBoss Log Manager 1.4.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||