ch.qos.logback.access.spi
Class AccessEvent

java.lang.Object
  extended by ch.qos.logback.access.spi.AccessEvent
All Implemented Interfaces:
DeferredProcessingAware, Serializable

public class AccessEvent
extends Object
implements Serializable, DeferredProcessingAware

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
static String EMPTY
           
static String NA
           
static String[] NA_STRING_ARRAY
           
static int 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()
           
 void prepareForDeferredProcessing()
           
 void setTimeStamp(long timeStamp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NA

public static final String NA
See Also:
Constant Field Values

NA_STRING_ARRAY

public static final String[] NA_STRING_ARRAY

EMPTY

public static final String EMPTY
See Also:
Constant Field Values

SENTINEL

public static final int SENTINEL
See Also:
Constant Field Values
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.

Returns:

getResponse

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

Returns:

getTimeStamp

public long getTimeStamp()

setTimeStamp

public void setTimeStamp(long timeStamp)

getRequestURI

public String getRequestURI()

getRequestURL

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


getRemoteHost

public String getRemoteHost()

getRemoteUser

public String getRemoteUser()

getProtocol

public String getProtocol()

getMethod

public String getMethod()

getServerName

public String getServerName()

getRemoteAddr

public String getRemoteAddr()

getRequestHeader

public String getRequestHeader(String key)

getRequestHeaderNames

public Enumeration getRequestHeaderNames()

getRequestHeaderMap

public Map<String,String> getRequestHeaderMap()

buildRequestHeaderMap

public void buildRequestHeaderMap()

buildRequestParameterMap

public void buildRequestParameterMap()

getRequestParameterMap

public Map<String,String[]> getRequestParameterMap()

getAttribute

public String getAttribute(String key)
Attributes are not serialized

Parameters:
key -

getRequestParameter

public String[] getRequestParameter(String key)

getCookie

public String getCookie(String key)

getContentLength

public long getContentLength()

getStatusCode

public int getStatusCode()

getRequestContent

public String getRequestContent()

getResponseContent

public String getResponseContent()

getLocalPort

public int getLocalPort()

getServerAdapter

public ServerAdapter getServerAdapter()

getResponseHeader

public String getResponseHeader(String key)

getResponseHeaderMap

public Map<String,String> getResponseHeaderMap()

getResponseHeaderNameList

public List<String> getResponseHeaderNameList()

prepareForDeferredProcessing

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


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