public class Access extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
Access.AcceptCharSetElement
write the Accept Character Set Element - %S
|
protected static class |
Access.AcceptElement
write the Accept Element - %C
|
protected static class |
Access.AcceptEncodingElement
write the Accept Encoding Element - %e
|
protected static class |
Access.AcceptLanguageElement
write the Accept Language Element - %L
|
protected static interface |
Access.AccessLogElement
AccessLogElement writes the partial message into the buffer.
|
protected static class |
Access.ByteSentElement
write bytes sent, excluding HTTP headers - %b, %B
|
protected static class |
Access.ConnectionElement
write the Connection Element - %x
|
protected static class |
Access.ContentEncodingElement
write the Content Encoding Element - %n
|
protected static class |
Access.ContentTypeElement
write the Content Type Element - %T
|
protected static class |
Access.CookieElement
write a specific cookie - %{xxx}c
|
protected static class |
Access.DateAndTimeElement
write date and time, in Common Log Format - %t
|
protected static class |
Access.HeaderElement
write incoming headers - %{xxx}i
|
protected static class |
Access.HostElement
write remote host name - %h
|
protected static class |
Access.HttpStatusCodeElement
write HTTP status code of the response - %s
|
protected static class |
Access.KeepAliveElement
write the Keep Alive Element - %k
|
protected static class |
Access.LocalAddrElement
write local IP address - %A
|
protected static class |
Access.LocalServerNameElement
write local server name - %v
|
protected static class |
Access.LogicalUserNameElement
write remote logical username from identd (always returns '-') - %l
|
protected static class |
Access.MethodElement
write request method (GET, POST, etc.) - %m
|
protected static class |
Access.RefererElement
write the referer - %f
|
protected static class |
Access.RequestAttributeElement
write an attribute in the ServletRequest - %{xxx}r %R
|
protected static class |
Access.RequestElement
write first line of the request (method and request URI) - %r
|
protected static class |
Access.RequestURIElement
write requested URL path - %U
|
protected static class |
Access.ResponseHeaderElement
write a specific response header - %{xxx}o
|
protected static class |
Access.ServerElement
write the Server Element - %Z
|
protected static class |
Access.StringElement
write any string
|
protected static class |
Access.TransferEncodingElement
write the Transfer Encoding Element - %E
|
protected static class |
Access.UserAgentElement
write the user agent - %a
|
protected static class |
Access.UserElement
write remote user that was authenticated (if any), else '-' - %u
|
protected static class |
Access.VaryElement
write the Vary Element - %V
|
Modifier and Type | Field and Description |
---|---|
protected Access.AccessLogElement[] |
logElements
Array of AccessLogElement, they will be used to make log message.
|
protected String |
pattern |
Constructor and Description |
---|
Access(org.apache.commons.logging.Log log,
AccessLogger accessLogger)
Constructor of AccessLog.
|
Modifier and Type | Method and Description |
---|---|
void |
addAccessToQueue(org.apache.http.HttpRequest request)
Adds the accesses to the queue.
|
void |
addAccessToQueue(org.apache.http.HttpResponse response)
Adds the accesses to the queue.
|
protected Access.AccessLogElement[] |
createLogElements()
parse pattern string and create the array of AccessLogElement
|
static String |
getAcceptCharSetElement(org.apache.http.HttpMessage message) |
static String |
getAcceptElement(org.apache.http.HttpMessage message) |
static String |
getAcceptEncodingElement(org.apache.http.HttpMessage message) |
static String |
getAcceptLanguageElement(org.apache.http.HttpMessage message) |
static String |
getConnectionElement(org.apache.http.HttpMessage message) |
static String |
getContentEncodingElement(org.apache.http.HttpMessage message) |
static String |
getContentTypeElement(org.apache.http.HttpMessage message) |
static String |
getCookieElement(org.apache.http.HttpMessage message) |
protected static String |
getHeaderValues(org.apache.http.HttpMessage message,
String name)
gets the header values from the given message, with the given name.
|
static String |
getHostElement(org.apache.http.HttpMessage message) |
static String |
getKeepAliveElement(org.apache.http.HttpMessage message) |
static String |
getLogicalUserNameElement(org.apache.http.HttpMessage message) |
static String |
getRefererElement(org.apache.http.HttpMessage message) |
static String |
getServerElement(org.apache.http.HttpMessage message) |
static String |
getTransferEncodingElement(org.apache.http.HttpMessage message) |
static String |
getUserAgentElement(org.apache.http.HttpMessage message) |
static String |
getUserNameElement(org.apache.http.HttpMessage message) |
static String |
getVaryElement(org.apache.http.HttpMessage message) |
void |
log(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse response)
The log method that is called from the NHttpClient and Server connection classes.
|
void |
logAccesses()
logs the request and response accesses.
|
protected Access.AccessLogElement[] logElements
protected String pattern
public Access(org.apache.commons.logging.Log log, AccessLogger accessLogger)
log
- - Log passed as a param. Default is Log of the same class.accessLogger
- - AccessLogger Objectpublic void addAccessToQueue(org.apache.http.HttpRequest request)
request
- - HttpRequestpublic void addAccessToQueue(org.apache.http.HttpResponse response)
response
- - HttpResponsepublic void logAccesses()
public void log(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response)
request
- - HttpRequestresponse
- - HttpResponseprotected static String getHeaderValues(org.apache.http.HttpMessage message, String name)
message
- - The message, HttpRequest or HttpResponsename
- - The header, which we need to get the value of.public static String getHostElement(org.apache.http.HttpMessage message)
public static String getLogicalUserNameElement(org.apache.http.HttpMessage message)
public static String getUserNameElement(org.apache.http.HttpMessage message)
public static String getCookieElement(org.apache.http.HttpMessage message)
public static String getRefererElement(org.apache.http.HttpMessage message)
public static String getUserAgentElement(org.apache.http.HttpMessage message)
public static String getAcceptElement(org.apache.http.HttpMessage message)
public static String getAcceptLanguageElement(org.apache.http.HttpMessage message)
public static String getAcceptEncodingElement(org.apache.http.HttpMessage message)
public static String getAcceptCharSetElement(org.apache.http.HttpMessage message)
public static String getConnectionElement(org.apache.http.HttpMessage message)
public static String getContentTypeElement(org.apache.http.HttpMessage message)
public static String getKeepAliveElement(org.apache.http.HttpMessage message)
public static String getTransferEncodingElement(org.apache.http.HttpMessage message)
public static String getContentEncodingElement(org.apache.http.HttpMessage message)
public static String getVaryElement(org.apache.http.HttpMessage message)
public static String getServerElement(org.apache.http.HttpMessage message)
protected Access.AccessLogElement[] createLogElements()
Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.