Package ch.qos.logback.access.spi
Class AccessEvent
- java.lang.Object
-
- ch.qos.logback.access.spi.AccessEvent
-
- All Implemented Interfaces:
IAccessEvent,DeferredProcessingAware,Serializable
public class AccessEvent extends Object implements Serializable, IAccessEvent
The Access module's internal representation of logging events. When the logging component instance is called in the container to log then aAccessEventinstance is created. This instance is passed around to the different logback components.- Author:
- Ceki Gülcü, Sébastien Pennec
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface ch.qos.logback.access.spi.IAccessEvent
NA, SENTINEL
-
-
Constructor Summary
Constructors Constructor Description AccessEvent(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, ServerAdapter adapter)
-
Method Summary
-
-
-
Constructor Detail
-
AccessEvent
public AccessEvent(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, ServerAdapter adapter)
-
-
Method Detail
-
getRequest
public javax.servlet.http.HttpServletRequest getRequest()
Returns the underlying HttpServletRequest. After serialization the returned value will be null.- Specified by:
getRequestin interfaceIAccessEvent- Returns:
-
getResponse
public javax.servlet.http.HttpServletResponse getResponse()
Returns the underlying HttpServletResponse. After serialization the returned value will be null.- Specified by:
getResponsein interfaceIAccessEvent- Returns:
-
getTimeStamp
public long getTimeStamp()
Description copied from interface:IAccessEventThe number of milliseconds elapsed from 1/1/1970 until logging event was created.- Specified by:
getTimeStampin interfaceIAccessEvent
-
setTimeStamp
public void setTimeStamp(long timeStamp)
-
setThreadName
public void setThreadName(String threadName)
- Specified by:
setThreadNamein interfaceIAccessEvent- Parameters:
threadName- The threadName to set.
-
getThreadName
public String getThreadName()
- Specified by:
getThreadNamein interfaceIAccessEvent
-
getRequestURI
public String getRequestURI()
- Specified by:
getRequestURIin interfaceIAccessEvent
-
getQueryString
public String getQueryString()
- Specified by:
getQueryStringin interfaceIAccessEvent
-
getRequestURL
public String getRequestURL()
The first line of the request.- Specified by:
getRequestURLin interfaceIAccessEvent
-
getRemoteHost
public String getRemoteHost()
- Specified by:
getRemoteHostin interfaceIAccessEvent
-
getRemoteUser
public String getRemoteUser()
- Specified by:
getRemoteUserin interfaceIAccessEvent
-
getProtocol
public String getProtocol()
- Specified by:
getProtocolin interfaceIAccessEvent
-
getMethod
public String getMethod()
- Specified by:
getMethodin interfaceIAccessEvent
-
getSessionID
public String getSessionID()
- Specified by:
getSessionIDin interfaceIAccessEvent
-
getServerName
public String getServerName()
- Specified by:
getServerNamein interfaceIAccessEvent
-
getRemoteAddr
public String getRemoteAddr()
- Specified by:
getRemoteAddrin interfaceIAccessEvent
-
getRequestHeader
public String getRequestHeader(String key)
- Specified by:
getRequestHeaderin interfaceIAccessEvent
-
getRequestHeaderNames
public Enumeration<String> getRequestHeaderNames()
- Specified by:
getRequestHeaderNamesin interfaceIAccessEvent
-
getRequestHeaderMap
public Map<String,String> getRequestHeaderMap()
- Specified by:
getRequestHeaderMapin interfaceIAccessEvent
-
buildRequestHeaderMap
public void buildRequestHeaderMap()
-
buildRequestParameterMap
public void buildRequestParameterMap()
-
getRequestParameterMap
public Map<String,String[]> getRequestParameterMap()
- Specified by:
getRequestParameterMapin interfaceIAccessEvent
-
getAttribute
public String getAttribute(String key)
- Specified by:
getAttributein interfaceIAccessEvent
-
getRequestParameter
public String[] getRequestParameter(String key)
- Specified by:
getRequestParameterin interfaceIAccessEvent
-
getCookie
public String getCookie(String key)
- Specified by:
getCookiein interfaceIAccessEvent
-
getContentLength
public long getContentLength()
- Specified by:
getContentLengthin interfaceIAccessEvent
-
getStatusCode
public int getStatusCode()
- Specified by:
getStatusCodein interfaceIAccessEvent
-
getElapsedSeconds
public long getElapsedSeconds()
Description copied from interface:IAccessEventThe number of seconds elapsed between receiving the request and logging it.- Specified by:
getElapsedSecondsin interfaceIAccessEvent
-
getElapsedTime
public long getElapsedTime()
Description copied from interface:IAccessEventThe time elapsed between receiving the request and logging it in milliseconds.- Specified by:
getElapsedTimein interfaceIAccessEvent
-
getRequestContent
public String getRequestContent()
- Specified by:
getRequestContentin interfaceIAccessEvent
-
getResponseContent
public String getResponseContent()
- Specified by:
getResponseContentin interfaceIAccessEvent
-
getLocalPort
public int getLocalPort()
- Specified by:
getLocalPortin interfaceIAccessEvent
-
getServerAdapter
public ServerAdapter getServerAdapter()
- Specified by:
getServerAdapterin interfaceIAccessEvent
-
getResponseHeader
public String getResponseHeader(String key)
- Specified by:
getResponseHeaderin interfaceIAccessEvent
-
getResponseHeaderMap
public Map<String,String> getResponseHeaderMap()
- Specified by:
getResponseHeaderMapin interfaceIAccessEvent
-
getResponseHeaderNameList
public List<String> getResponseHeaderNameList()
- Specified by:
getResponseHeaderNameListin interfaceIAccessEvent
-
prepareForDeferredProcessing
public void prepareForDeferredProcessing()
- Specified by:
prepareForDeferredProcessingin interfaceDeferredProcessingAware
-
-