org.springframework.web.context.support

Class ServletRequestHandledEvent

    • Field Summary

      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor and Description
      ServletRequestHandledEvent(java.lang.Object source, java.lang.String requestUrl, java.lang.String clientAddress, java.lang.String method, java.lang.String servletName, java.lang.String sessionId, java.lang.String userName, long processingTimeMillis)
      Create a new ServletRequestHandledEvent.
      ServletRequestHandledEvent(java.lang.Object source, java.lang.String requestUrl, java.lang.String clientAddress, java.lang.String method, java.lang.String servletName, java.lang.String sessionId, java.lang.String userName, long processingTimeMillis, java.lang.Throwable failureCause)
      Create a new ServletRequestHandledEvent.
      ServletRequestHandledEvent(java.lang.Object source, java.lang.String requestUrl, java.lang.String clientAddress, java.lang.String method, java.lang.String servletName, java.lang.String sessionId, java.lang.String userName, long processingTimeMillis, java.lang.Throwable failureCause, int statusCode)
      Create a new ServletRequestHandledEvent.
    • Constructor Detail

      • ServletRequestHandledEvent

        public ServletRequestHandledEvent(java.lang.Object source,
                                          java.lang.String requestUrl,
                                          java.lang.String clientAddress,
                                          java.lang.String method,
                                          java.lang.String servletName,
                                          @Nullable
                                          java.lang.String sessionId,
                                          @Nullable
                                          java.lang.String userName,
                                          long processingTimeMillis)
        Create a new ServletRequestHandledEvent.
        Parameters:
        source - the component that published the event
        requestUrl - the URL of the request
        clientAddress - the IP address that the request came from
        method - the HTTP method of the request (usually GET or POST)
        servletName - the name of the servlet that handled the request
        sessionId - the id of the HTTP session, if any
        userName - the name of the user that was associated with the request, if any (usually the UserPrincipal)
        processingTimeMillis - the processing time of the request in milliseconds
      • ServletRequestHandledEvent

        public ServletRequestHandledEvent(java.lang.Object source,
                                          java.lang.String requestUrl,
                                          java.lang.String clientAddress,
                                          java.lang.String method,
                                          java.lang.String servletName,
                                          @Nullable
                                          java.lang.String sessionId,
                                          @Nullable
                                          java.lang.String userName,
                                          long processingTimeMillis,
                                          @Nullable
                                          java.lang.Throwable failureCause)
        Create a new ServletRequestHandledEvent.
        Parameters:
        source - the component that published the event
        requestUrl - the URL of the request
        clientAddress - the IP address that the request came from
        method - the HTTP method of the request (usually GET or POST)
        servletName - the name of the servlet that handled the request
        sessionId - the id of the HTTP session, if any
        userName - the name of the user that was associated with the request, if any (usually the UserPrincipal)
        processingTimeMillis - the processing time of the request in milliseconds
        failureCause - the cause of failure, if any
      • ServletRequestHandledEvent

        public ServletRequestHandledEvent(java.lang.Object source,
                                          java.lang.String requestUrl,
                                          java.lang.String clientAddress,
                                          java.lang.String method,
                                          java.lang.String servletName,
                                          @Nullable
                                          java.lang.String sessionId,
                                          @Nullable
                                          java.lang.String userName,
                                          long processingTimeMillis,
                                          @Nullable
                                          java.lang.Throwable failureCause,
                                          int statusCode)
        Create a new ServletRequestHandledEvent.
        Parameters:
        source - the component that published the event
        requestUrl - the URL of the request
        clientAddress - the IP address that the request came from
        method - the HTTP method of the request (usually GET or POST)
        servletName - the name of the servlet that handled the request
        sessionId - the id of the HTTP session, if any
        userName - the name of the user that was associated with the request, if any (usually the UserPrincipal)
        processingTimeMillis - the processing time of the request in milliseconds
        failureCause - the cause of failure, if any
        statusCode - the HTTP status code of the response
    • Method Detail

      • getRequestUrl

        public java.lang.String getRequestUrl()
        Return the URL of the request.
      • getClientAddress

        public java.lang.String getClientAddress()
        Return the IP address that the request came from.
      • getMethod

        public java.lang.String getMethod()
        Return the HTTP method of the request (usually GET or POST).
      • getServletName

        public java.lang.String getServletName()
        Return the name of the servlet that handled the request.
      • getStatusCode

        public int getStatusCode()
        Return the HTTP status code of the response or -1 if the status code is not available.
        Since:
        4.1