Class QueueingAppender
- java.lang.Object
-
- org.glassfish.grizzly.http.server.accesslog.QueueingAppender
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,AccessLogAppender
public class QueueingAppender extends java.lang.Object implements AccessLogAppender
Anappenderenqueueing log entries into aLinkedBlockingQueueand using a secondary, separateThreadto forward them to a configured nestedappender.- Author:
- Pier Fumagalli, USRZ.com
-
-
Constructor Summary
Constructors Constructor Description QueueingAppender(AccessLogAppender appender)Create a newQueueingAppenderinstance enqueueing log entries into aLinkedBlockingQueueand dequeueing them using a secondary separateThread.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappend(java.lang.String accessLogEntry)Append the specified access log entry.voidclose()Close any underlying resource owned by this appender.
-
-
-
Constructor Detail
-
QueueingAppender
public QueueingAppender(AccessLogAppender appender)
Create a newQueueingAppenderinstance enqueueing log entries into aLinkedBlockingQueueand dequeueing them using a secondary separateThread.
-
-
Method Detail
-
append
public void append(java.lang.String accessLogEntry) throws java.io.IOExceptionDescription copied from interface:AccessLogAppenderAppend the specified access log entry.- Specified by:
appendin interfaceAccessLogAppender- Parameters:
accessLogEntry- TheStringvalue of the data to be append in the access log.- Throws:
java.io.IOException- If an I/O error occurred appending to the log.
-
close
public void close() throws java.io.IOExceptionDescription copied from interface:AccessLogAppenderClose any underlying resource owned by this appender.- Specified by:
closein interfaceAccessLogAppender- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-