|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.web.accesslog.AccessLogFormatter
public abstract class AccessLogFormatter
Abstract class defining an interface for appending access log entries to the access log in a customized access log format.
| Field Summary | |
|---|---|
protected java.lang.ThreadLocal<java.text.SimpleDateFormat> |
dayFormatter
ThreadLocal for a date formatter to format Dates into a day string in the format "dd". |
protected java.lang.ThreadLocal<java.text.SimpleDateFormat> |
monthFormatter
ThreadLocal for a date formatter to format a Date into a month string in the format "MM". |
protected static java.lang.String[] |
months
The set of month abbreviations for log messages. |
protected boolean |
needTimeTaken
|
protected static java.lang.String |
SPACE
When formatting log lines, we often use strings like this one (" "). |
protected java.lang.ThreadLocal<java.text.SimpleDateFormat> |
timeFormatter
ThreadLocal for a date formatter to format a Date into a time in the format "kk:mm:ss" (kk is a 24-hour representation of the hour). |
protected java.lang.String |
timeZone
The time zone relative to GMT. |
protected java.util.TimeZone |
tz
|
protected java.lang.ThreadLocal<java.text.SimpleDateFormat> |
yearFormatter
ThreadLocal for a date formatter to format a Date into a year string in the format "yyyy". |
| Constructor Summary | |
|---|---|
AccessLogFormatter()
Constructor. |
|
| Method Summary | |
|---|---|
abstract void |
appendLogEntry(Request request,
Response response,
java.nio.CharBuffer charBuffer)
Appends an access log entry line, with info obtained from the given request and response objects, to the given CharBuffer. |
protected java.lang.String |
calculateTimeZoneOffset(long offset)
|
protected java.util.Date |
getDate()
This method returns a Date object that is accurate to within one second. |
protected java.lang.String |
lookup(java.lang.String month)
Return the month abbreviation for the specified month, which must be a two-digit String. |
boolean |
needTimeTaken()
Has the time-taken token been specified in the access log pattern? |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String[] months
protected static final java.lang.String SPACE
protected volatile java.lang.ThreadLocal<java.text.SimpleDateFormat> dayFormatter
protected volatile java.lang.ThreadLocal<java.text.SimpleDateFormat> monthFormatter
protected volatile java.lang.ThreadLocal<java.text.SimpleDateFormat> yearFormatter
protected volatile java.lang.ThreadLocal<java.text.SimpleDateFormat> timeFormatter
protected java.lang.String timeZone
protected java.util.TimeZone tz
protected boolean needTimeTaken
| Constructor Detail |
|---|
public AccessLogFormatter()
| Method Detail |
|---|
public abstract void appendLogEntry(Request request,
Response response,
java.nio.CharBuffer charBuffer)
request - The request object from which to obtain access log inforesponse - The response object from which to obtain access log infocharBuffer - The CharBuffer to which to append access log infoprotected java.util.Date getDate()
protected java.lang.String calculateTimeZoneOffset(long offset)
protected java.lang.String lookup(java.lang.String month)
month - Month number ("01" .. "12").public boolean needTimeTaken()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||