|
JBoss Log Manager 1.4.1.Final | |||||||||
| 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.QueueHandler
public class QueueHandler
A queue handler which retains the last few messages logged. The handler can be used as-is to remember recent messages, or one or more handlers may be nested, which allows this handler to "replay" messages to the child handler(s) upon request.
| Field Summary |
|---|
| Fields inherited from class org.jboss.logmanager.ExtHandler |
|---|
handlers, handlersUpdater |
| Constructor Summary | |
|---|---|
QueueHandler()
Construct a new instance with a default queue length. |
|
QueueHandler(int limit)
Construct a new instance. |
|
| Method Summary | |
|---|---|
protected void |
doPublish(ExtLogRecord record)
Do the actual work of publication; the record will have been filtered already. |
int |
getLimit()
Get the queue length limit. |
ExtLogRecord[] |
getQueue()
Get a copy of the queue as it is at an exact moment in time. |
String[] |
getQueueAsStrings()
Get a copy of the queue, rendering each record as a string. |
void |
replay()
Replay the stored queue to the nested handlers. |
void |
setLimit(int limit)
Set the queue length limit. |
| Methods inherited from class org.jboss.logmanager.ExtHandler |
|---|
addHandler, checkAccess, checkAccess, clearHandlers, close, 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 QueueHandler()
public QueueHandler(int limit)
limit - the queue length to use| Method Detail |
|---|
protected void doPublish(ExtLogRecord record)
ExtHandlerautoFlush 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 int getLimit()
public void setLimit(int limit)
limit - the queue length limitpublic ExtLogRecord[] getQueue()
public String[] getQueueAsStrings()
public void replay()
|
JBoss Log Manager 1.4.1.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||