Top Description Inners Fields Constructors Methods
org.glassfish.grizzly.http.server.accesslog

public Class QueueingAppender

extends Object
implements AccessLogAppender
Class Inheritance
All Implemented Interfaces
org.glassfish.grizzly.http.server.accesslog.AccessLogAppender, java.io.Closeable, java.lang.AutoCloseable
Static Imports
java.util.logging.Level.FINE, .Level.WARNING

An appender enqueueing log entries into a LinkedBlockingQueue and using a secondary, separate Thread to forward them to a configured nested appender.
Authors
Pier Fumagalli, USRZ.com

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final AccessLogAppender
private static final Logger
private final LinkedBlockingQueue<String>
private final Thread

Constructor Summary

AccessConstructor and Description
public
QueueingAppender(AccessLogAppender appender)

Create a new QueueingAppender instance enqueueing log entries into a LinkedBlockingQueue and dequeueing them using a secondary separate Thread.

Method Summary

Modifier and TypeMethod and Description
public void
append(String accessLogEntry)

Implements org.glassfish.grizzly.http.server.accesslog.AccessLogAppender.append.

Append the specified access log entry.

public void
close()

Implements org.glassfish.grizzly.http.server.accesslog.AccessLogAppender.close.

Close any underlying resource owned by this appender.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

appenderback to summary
private final AccessLogAppender appender
LOGGERback to summary
private static final Logger LOGGER
queueback to summary
private final LinkedBlockingQueue<String> queue
threadback to summary
private final Thread thread

Constructor Detail

QueueingAppenderback to summary
public QueueingAppender(AccessLogAppender appender)

Create a new QueueingAppender instance enqueueing log entries into a LinkedBlockingQueue and dequeueing them using a secondary separate Thread.

Method Detail

appendback to summary
public void append(String accessLogEntry) throws IOException

Implements org.glassfish.grizzly.http.server.accesslog.AccessLogAppender.append.

Doc from org.glassfish.grizzly.http.server.accesslog.AccessLogAppender.append.

Append the specified access log entry.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurred appending to the log.
closeback to summary
public void close() throws IOException

Implements org.glassfish.grizzly.http.server.accesslog.AccessLogAppender.close.

Doc from org.glassfish.grizzly.http.server.accesslog.AccessLogAppender.close.

Close any underlying resource owned by this appender.

Annotations
@Override
Exceptions
IOException:

Doc from java.io.Closeable.close.

if an I/O error occurs

org.glassfish.grizzly.http.server.accesslog back to summary

private final Class QueueingAppender.Dequeuer

extends Object
implements Runnable
Class Inheritance
  • java.lang.Object
  • org.glassfish.grizzly.http.server.accesslog.QueueingAppender.Dequeuer
All Implemented Interfaces
java.lang.Runnable

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Dequeuerback to summary
private Dequeuer()

Method Detail

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override