public class QueueHandler extends ExtHandler
handlers, handlersUpdater
Constructor and Description |
---|
QueueHandler()
Construct a new instance with a default queue length.
|
QueueHandler(int limit)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
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.
|
addHandler, checkAccess, checkAccess, clearHandlers, close, disableAccess, enableAccess, flush, getHandlers, isAutoFlush, isEnabled, protect, publish, publish, removeHandler, setAutoFlush, setEnabled, setEncoding, setErrorManager, setFilter, setFormatter, setHandlers, setLevel, unprotect
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError
public QueueHandler()
public QueueHandler(int limit)
limit
- the queue length to useprotected void doPublish(ExtLogRecord record)
ExtHandler
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 ExtHandler
record
- 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()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.