|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.turbine.services.logging.BaseRunDataFilter
This class extracts data from RunData object. It is configured by a string describing format of output.
Format description
Each token should be seperate by space. In output known token
will be replaced by coresponding data from RunData, unkonwn will be
returned unchanged on output.
Conversion token:
Field Summary | |
protected java.lang.String |
DELIM
|
protected java.lang.String |
format
applied format |
protected static java.util.Map |
methodNamesMap
table matching conversion tokens to methods names |
protected java.util.List |
pattern
parsed format |
Constructor Summary | |
BaseRunDataFilter()
|
Method Summary | |
(package private) static void |
initialization of the conversion table |
private static java.lang.String |
getAuthType(RunData data)
Retrives the name of the authentication scheme used to protect the servlet, for example, "BASIC" or "SSL," or null if the servlet was not protected. |
private static java.lang.String |
getBannerInfo(RunData data)
Retrives the banner info asociated with the user making the request. |
private static java.lang.String |
getCharacterEncoding(RunData data)
Retrives the name of the character encoding used in the body of this request. |
private static java.lang.String |
getContentLength(RunData data)
Retrives the length, in bytes, of the request body and made available by the input stream, or -1 if the length is not known. |
private static java.lang.String |
getContentType(RunData data)
Retrives the MIME type of the body of the request, or null if the type is not known. |
private static java.lang.String |
getContextPath(RunData data)
Retrives the portion of the request URI that indicates the context of the request. |
private static java.lang.String |
getCookies(RunData data)
Retrives cookies. |
private static java.lang.String |
getHeader(RunData data,
java.lang.String symbol)
Retrives the value of the specified request header. |
private static java.lang.String |
getMethod(RunData data)
Retrives the cached method that is stored in the ServerData object |
private static java.lang.String |
getProtocol(RunData data)
Retrives the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion |
private static java.lang.String |
getQueryString(RunData data)
Retrives the query string that is contained in the request URL after the path. |
private static java.lang.String |
getRemoteAddr(RunData data)
Retrives remote host address. |
private static java.lang.String |
getRemoteHost(RunData data)
Retrives remote host name. |
private static java.lang.String |
getRemoteUser(RunData data)
Retrives the login of the user making this request, if the user has been authenticated, or null if the user has not been authenticated. |
private static java.lang.String |
getScheme(RunData data)
Retrives the name of the scheme used to make this request, for example, http, https, or ftp. |
private static java.lang.String |
getServerName(RunData data)
Retrives the cached serverName that is stored in the ServerData object |
private static java.lang.String |
getServerPort(RunData data)
Retrives the cached serverPort that is stored in the ServerData object |
private static java.lang.String |
getSessionId(RunData data)
Retrives a string containing the unique identifier assigned to this session |
java.lang.String |
getString(RunData data)
For each field in tha pattern looking for method extracting data from RunData, invokes the method, and adds return value to return value. |
private static java.lang.String |
getTime(RunData data)
Retrives current system time. |
private static java.lang.String |
getURLRequested(RunData data)
Retrives the url requested by the client |
private static java.lang.String |
getUser(RunData data)
Retrives first and last name of the user making the request. |
private static java.lang.String |
getUserAgent(RunData data)
Retrives the user agent name. |
void |
setFormat(java.lang.String format)
parses format string |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
Field Detail |
protected static java.util.Map methodNamesMap
protected java.lang.String format
protected java.util.List pattern
protected final java.lang.String DELIM
Constructor Detail |
public BaseRunDataFilter()
Method Detail |
static void()
public void setFormat(java.lang.String format)
setFormat
in interface RunDataFilter
org.apache.turbine.services.logging.RunDataFilter
format
- - description which data should be extractedpublic java.lang.String getString(RunData data)
getString
in interface RunDataFilter
data
- - RunDate from which data will be extractedprivate static java.lang.String getTime(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getURLRequested(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getRemoteHost(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getRemoteAddr(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getRemoteUser(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getServerPort(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getServerName(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getMethod(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getHeader(RunData data, java.lang.String symbol)
data
- RunData object associated with this requestsymbol
- pattern element containig header line name between {}
bracketsprivate static java.lang.String getQueryString(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getContextPath(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getSessionId(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getAuthType(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getContentType(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getCharacterEncoding(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getProtocol(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getScheme(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getContentLength(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getUserAgent(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getBannerInfo(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getUser(RunData data)
data
- RunData object associated with this requestprivate static java.lang.String getCookies(RunData data)
data
- RunData object associated with this request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |