Spring Framework

org.springframework.web.context.support
Class ServletRequestHandledEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.springframework.context.ApplicationEvent
          extended by org.springframework.web.context.support.RequestHandledEvent
              extended by org.springframework.web.context.support.ServletRequestHandledEvent
All Implemented Interfaces:
java.io.Serializable

public class ServletRequestHandledEvent
extends RequestHandledEvent

Servlet-specific subclass of RequestHandledEvent, adding servlet-specific context information.

Since:
2.0
Author:
Juergen Hoeller
See Also:
FrameworkServlet, ApplicationEventPublisher.publishEvent(org.springframework.context.ApplicationEvent), Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
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.
 
Method Summary
 java.lang.String getClientAddress()
          Return the IP address that the request came from.
 java.lang.String getDescription()
          Return a full description of this event, involving all available context data.
 java.lang.String getMethod()
          Return the HTTP method of the request (usually GET or POST).
 java.lang.String getRequestUrl()
          Return the URL of the request.
 java.lang.String getServletName()
          Return the name of the servlet that handled the request.
 java.lang.String getShortDescription()
          Return a short description of this event, only involving the most important context data.
 java.lang.String toString()
           
 
Methods inherited from class org.springframework.web.context.support.RequestHandledEvent
getFailureCause, getProcessingTimeMillis, getSessionId, getUserName, wasFailure
 
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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,
                                  java.lang.String sessionId,
                                  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,
                                  java.lang.String sessionId,
                                  java.lang.String userName,
                                  long processingTimeMillis,
                                  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
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.


getShortDescription

public java.lang.String getShortDescription()
Description copied from class: RequestHandledEvent
Return a short description of this event, only involving the most important context data.

Overrides:
getShortDescription in class RequestHandledEvent

getDescription

public java.lang.String getDescription()
Description copied from class: RequestHandledEvent
Return a full description of this event, involving all available context data.

Overrides:
getDescription in class RequestHandledEvent

toString

public java.lang.String toString()
Overrides:
toString in class RequestHandledEvent

Spring Framework