|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.jira.web.filters.accesslog.AccessLogBuilder
public class AccessLogBuilder
A builder class that can create access log entries
Constructor Summary | |
---|---|
AccessLogBuilder(javax.servlet.http.HttpServletRequest httpReq)
Constructs a Apache CLF builder in the context of the given HttpServletRequest |
Method Summary | |
---|---|
org.joda.time.ReadableInstant |
getDateOfEvent()
|
javax.servlet.http.HttpServletRequest |
getHttpReq()
|
int |
getHttpStatusCode()
|
String |
getRequestId()
|
long |
getResponseContentLength()
|
long |
getResponseTimeMS()
|
String |
getSessionId()
|
String |
getUrl()
|
String |
getUserName()
|
AccessLogBuilder |
setDateOfEvent(org.joda.time.ReadableInstant dateOfEvent)
Sets the date of the log event. |
AccessLogBuilder |
setHttpStatusCode(int httpStatusCode)
Sets the HTTP status code |
AccessLogBuilder |
setRequestId(String requestId)
Sets a request id into the builder |
AccessLogBuilder |
setResponseContentLength(long responseContentLength)
Sets the response content length |
AccessLogBuilder |
setResponseTimeMS(long responseTimeMS)
Sets the response time in milliseconds |
AccessLogBuilder |
setSessionId(String sessionId)
Sets the sessionId to use in this builder |
AccessLogBuilder |
setUrl(String url)
Sets the URL of the builder |
AccessLogBuilder |
setUserName(String userName)
Sets the user name to use in the log |
String |
toApacheCombinedLogFormat()
This turns the builder into a Apache Combined Log Format line with a JIRA twist http://httpd.apache.org/docs/1.3/logs.html |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AccessLogBuilder(javax.servlet.http.HttpServletRequest httpReq)
httpReq
- must be non nullMethod Detail |
---|
public org.joda.time.ReadableInstant getDateOfEvent()
public String getRequestId()
public javax.servlet.http.HttpServletRequest getHttpReq()
public String getUrl()
public String getUserName()
public String getSessionId()
public long getResponseTimeMS()
public int getHttpStatusCode()
public long getResponseContentLength()
public AccessLogBuilder setDateOfEvent(org.joda.time.ReadableInstant dateOfEvent)
dateOfEvent
- the date of the log event
public AccessLogBuilder setRequestId(String requestId)
requestId
- the id of the request
public AccessLogBuilder setUrl(String url)
url
- the ULR in play
public AccessLogBuilder setUserName(String userName)
userName
- the name of the user
public AccessLogBuilder setSessionId(String sessionId)
sessionId
- the session id in play
public AccessLogBuilder setResponseTimeMS(long responseTimeMS)
responseTimeMS
- the resposne time in ms
public AccessLogBuilder setHttpStatusCode(int httpStatusCode)
httpStatusCode
- the HTTP status code
public AccessLogBuilder setResponseContentLength(long responseContentLength)
responseContentLength
- the response content length
public String toApacheCombinedLogFormat()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |