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 |
publish(ExtLogRecord record)
Publish an
ExtLogRecord. |
void |
publish(LogRecord record) |
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, removeHandler, setAutoFlush, setEnabled, setEncoding, setErrorManager, setFilter, setFormatter, setHandlers, setLevel, unprotectgetEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportErrorpublic QueueHandler()
public QueueHandler(int limit)
limit - the queue length to usepublic void publish(ExtLogRecord record)
ExtHandlerExtLogRecord.
The logging request was made initially to a Logger object, which initialized the LogRecord and forwarded it here.
The ExtHandler is responsible for formatting the message, when and if necessary. The formatting should
include localization.publish in class ExtHandlerrecord - the log record to publishpublic void publish(LogRecord record)
ExtHandlerpublish in class ExtHandlerprotected 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()
Copyright © 2016 JBoss by Red Hat. All rights reserved.