Class AccessEvent

  • All Implemented Interfaces:
    IAccessEvent, DeferredProcessingAware, java.io.Serializable

    public class AccessEvent
    extends java.lang.Object
    implements java.io.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
    • 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)
      • setThreadName

        public void setThreadName​(java.lang.String threadName)
        Specified by:
        setThreadName in interface IAccessEvent
        Parameters:
        threadName - The threadName to set.
      • getRequestURL

        public java.lang.String getRequestURL()
        The first line of the request.
        Specified by:
        getRequestURL in interface IAccessEvent
      • getRequestHeader

        public java.lang.String getRequestHeader​(java.lang.String key)
        Specified by:
        getRequestHeader in interface IAccessEvent
      • getRequestHeaderMap

        public java.util.Map<java.lang.String,​java.lang.String> getRequestHeaderMap()
        Specified by:
        getRequestHeaderMap in interface IAccessEvent
      • buildRequestHeaderMap

        public void buildRequestHeaderMap()
      • buildRequestParameterMap

        public void buildRequestParameterMap()
      • getRequestParameterMap

        public java.util.Map<java.lang.String,​java.lang.String[]> getRequestParameterMap()
        Specified by:
        getRequestParameterMap in interface IAccessEvent
      • getAttribute

        public java.lang.String getAttribute​(java.lang.String key)
        Specified by:
        getAttribute in interface IAccessEvent
      • getRequestParameter

        public java.lang.String[] getRequestParameter​(java.lang.String key)
        Specified by:
        getRequestParameter in interface IAccessEvent
      • getCookie

        public java.lang.String getCookie​(java.lang.String key)
        Specified by:
        getCookie in interface IAccessEvent
      • getElapsedSeconds

        public long getElapsedSeconds()
        Description copied from interface: IAccessEvent
        The number of seconds elapsed between receiving the request and logging it.
        Specified by:
        getElapsedSeconds in interface IAccessEvent
      • getElapsedTime

        public long getElapsedTime()
        Description copied from interface: IAccessEvent
        The time elapsed between receiving the request and logging it in milliseconds.
        Specified by:
        getElapsedTime in interface IAccessEvent
      • getResponseHeader

        public java.lang.String getResponseHeader​(java.lang.String key)
        Specified by:
        getResponseHeader in interface IAccessEvent
      • getResponseHeaderMap

        public java.util.Map<java.lang.String,​java.lang.String> getResponseHeaderMap()
        Specified by:
        getResponseHeaderMap in interface IAccessEvent