|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.log4j.AppenderSkeleton de.fhg.igd.logging.log4j.URLAppender
Depending on the configured buffer size, this
Appender
will open a URLOutputStream
which will be linked into either a simple WriterAppender
or an
AsynchronousWriterAppender
which is being wrapped by this class.
On dynamic configuration changes, this wrapped Appender
might
get exchanged accordingly.
Field Summary | |
protected Integer |
buffersize_
The buffer size |
private static Set |
cache_
The storage for deployed URLAppender objects |
private Chronometer |
cm_
The Chronometer that is assigned to the output
destination of this Appender |
private int |
cnt_
The reference counter |
protected org.apache.log4j.WriterAppender |
wa_
The wrapped target WriterAppender |
Fields inherited from class org.apache.log4j.AppenderSkeleton |
closed, errorHandler, headFilter, layout, name, tailFilter, threshold |
Constructor Summary | |
protected |
URLAppender(Chronometer cm)
Hidden URLAppender construction. |
Method Summary | |
void |
append(org.apache.log4j.spi.LoggingEvent event)
Hand over an event to the target Appender . |
void |
close()
This method will close underlying streams, remove this Appender from the cache in case no further
reference exists. |
private static org.apache.log4j.WriterAppender |
createTarget(OutputStream os,
org.apache.log4j.Layout layout,
int bufsize)
Create the target WriterAppender . |
boolean |
equals(Object obj)
|
(package private) static URLAppender |
findFor(Chronometer cm)
Find a URLAppender that has already been created
before. |
Integer |
getBufferSize()
Get the size of the internal message buffer. |
URL |
getOutputDestination()
Get the output destination URL . |
int |
hashCode()
|
(package private) static URLAppender |
requestFor(Chronometer cm)
Request a URLAppender . |
boolean |
requiresLayout()
|
String |
toString()
|
void |
updateBufferSize(Integer buffersize)
Update the size of the internal message buffer. |
Methods inherited from class org.apache.log4j.AppenderSkeleton |
activateOptions, addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static Set cache_
URLAppender
objects
private int cnt_
private Chronometer cm_
Chronometer
that is assigned to the output
destination of this Appender
protected Integer buffersize_
protected org.apache.log4j.WriterAppender wa_
WriterAppender
Constructor Detail |
protected URLAppender(Chronometer cm)
URLAppender
construction.
cm
- The Chronometer
that is assigned to the
URL
to create the Appender
for
LoggingException
- if creating the corresponding
URLOutputStream
failedMethod Detail |
static URLAppender requestFor(Chronometer cm)
URLAppender
. In case the requested instance
has been created before, a reference to the existing instance will
be returned and counted.
cm
- The Chronometer
that is assigned to the
URL
that the Appender
is requested for
Appender
static URLAppender findFor(Chronometer cm)
URLAppender
that has already been created
before. If no instance could be found for the given
Chronometer
, null
will be returned.
cm
- The Chronometer
that is assigned to the
URL
to find the corresponding
URLAppender
for
URLAppender
or null
if no instance for the given Chronometer
has been
created yetprivate static org.apache.log4j.WriterAppender createTarget(OutputStream os, org.apache.log4j.Layout layout, int bufsize)
WriterAppender
.
os
- The underlying output streamlayout
- The log event layoutbufsize
- The size of the internal message bufferpublic void append(org.apache.log4j.spi.LoggingEvent event)
Appender
.
event
- The log event to be appendedpublic boolean requiresLayout()
requiresLayout
in interface org.apache.log4j.Appender
public void close()
Appender
from the cache in case no further
reference exists.
close
in interface org.apache.log4j.Appender
public URL getOutputDestination()
Forwarder
URL
.
getOutputDestination
in interface Forwarder
public Integer getBufferSize()
Forwarder
getBufferSize
in interface Forwarder
public void updateBufferSize(Integer buffersize)
Forwarder
updateBufferSize
in interface Forwarder
buffersize
- The new size of the internal message bufferpublic boolean equals(Object obj)
public int hashCode()
public String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |