ch.qos.logback.access.spi
Class AccessEvent

java.lang.Object
  extended by 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 a AccessEvent instance 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
AccessEvent(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, ServerAdapter adapter)
           
 
Method Summary
 void buildRequestHeaderMap()
           
 void buildRequestParameterMap()
           
 String getAttribute(String key)
          Attributes are not serialized
 long getContentLength()
           
 String getCookie(String key)
           
 int getLocalPort()
           
 String getMethod()
           
 String getProtocol()
           
 String getRemoteAddr()
           
 String getRemoteHost()
           
 String getRemoteUser()
           
 javax.servlet.http.HttpServletRequest getRequest()
          Returns the underlying HttpServletRequest.
 String getRequestContent()
           
 String getRequestHeader(String key)
           
 Map<String,String> getRequestHeaderMap()
           
 Enumeration getRequestHeaderNames()
           
 String[] getRequestParameter(String key)
           
 Map<String,String[]> getRequestParameterMap()
           
 String getRequestURI()
           
 String getRequestURL()
          The first line of the request.
 javax.servlet.http.HttpServletResponse getResponse()
          Returns the underlying HttpServletResponse.
 String getResponseContent()
           
 String getResponseHeader(String key)
           
 Map<String,String> getResponseHeaderMap()
           
 List<String> getResponseHeaderNameList()
           
 ServerAdapter getServerAdapter()
           
 String getServerName()
           
 int getStatusCode()
           
 long getTimeStamp()
          The number of milliseconds elapsed from 1/1/1970 until logging event was created.
 void prepareForDeferredProcessing()
           
 void setTimeStamp(long timeStamp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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:
getRequest in interface IAccessEvent
Returns:

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Returns the underlying HttpServletResponse. After serialization the returned value will be null.

Specified by:
getResponse in interface IAccessEvent
Returns:

getTimeStamp

public long getTimeStamp()
Description copied from interface: IAccessEvent
The number of milliseconds elapsed from 1/1/1970 until logging event was created.

Specified by:
getTimeStamp in interface IAccessEvent

setTimeStamp

public void setTimeStamp(long timeStamp)

getRequestURI

public String getRequestURI()
Specified by:
getRequestURI in interface IAccessEvent

getRequestURL

public String getRequestURL()
The first line of the request.

Specified by:
getRequestURL in interface IAccessEvent

getRemoteHost

public String getRemoteHost()
Specified by:
getRemoteHost in interface IAccessEvent

getRemoteUser

public String getRemoteUser()
Specified by:
getRemoteUser in interface IAccessEvent

getProtocol

public String getProtocol()
Specified by:
getProtocol in interface IAccessEvent

getMethod

public String getMethod()
Specified by:
getMethod in interface IAccessEvent

getServerName

public String getServerName()
Specified by:
getServerName in interface IAccessEvent

getRemoteAddr

public String getRemoteAddr()
Specified by:
getRemoteAddr in interface IAccessEvent

getRequestHeader

public String getRequestHeader(String key)
Specified by:
getRequestHeader in interface IAccessEvent

getRequestHeaderNames

public Enumeration getRequestHeaderNames()
Specified by:
getRequestHeaderNames in interface IAccessEvent

getRequestHeaderMap

public Map<String,String> getRequestHeaderMap()
Specified by:
getRequestHeaderMap in interface IAccessEvent

buildRequestHeaderMap

public void buildRequestHeaderMap()

buildRequestParameterMap

public void buildRequestParameterMap()

getRequestParameterMap

public Map<String,String[]> getRequestParameterMap()
Specified by:
getRequestParameterMap in interface IAccessEvent

getAttribute

public String getAttribute(String key)
Attributes are not serialized

Specified by:
getAttribute in interface IAccessEvent
Parameters:
key -

getRequestParameter

public String[] getRequestParameter(String key)
Specified by:
getRequestParameter in interface IAccessEvent

getCookie

public String getCookie(String key)
Specified by:
getCookie in interface IAccessEvent

getContentLength

public long getContentLength()
Specified by:
getContentLength in interface IAccessEvent

getStatusCode

public int getStatusCode()
Specified by:
getStatusCode in interface IAccessEvent

getRequestContent

public String getRequestContent()
Specified by:
getRequestContent in interface IAccessEvent

getResponseContent

public String getResponseContent()
Specified by:
getResponseContent in interface IAccessEvent

getLocalPort

public int getLocalPort()
Specified by:
getLocalPort in interface IAccessEvent

getServerAdapter

public ServerAdapter getServerAdapter()
Specified by:
getServerAdapter in interface IAccessEvent

getResponseHeader

public String getResponseHeader(String key)
Specified by:
getResponseHeader in interface IAccessEvent

getResponseHeaderMap

public Map<String,String> getResponseHeaderMap()
Specified by:
getResponseHeaderMap in interface IAccessEvent

getResponseHeaderNameList

public List<String> getResponseHeaderNameList()
Specified by:
getResponseHeaderNameList in interface IAccessEvent

prepareForDeferredProcessing

public void prepareForDeferredProcessing()
Specified by:
prepareForDeferredProcessing in interface DeferredProcessingAware


Copyright © 2005-2012 QOS.ch. All Rights Reserved.