public class ServletRequestHandledEvent extends RequestHandledEvent
FrameworkServlet
,
ApplicationEventPublisher.publishEvent(org.springframework.context.ApplicationEvent)
,
Serialized Formsource
Constructor and Description |
---|
ServletRequestHandledEvent(Object source,
String requestUrl,
String clientAddress,
String method,
String servletName,
String sessionId,
String userName,
long processingTimeMillis)
Create a new ServletRequestHandledEvent.
|
ServletRequestHandledEvent(Object source,
String requestUrl,
String clientAddress,
String method,
String servletName,
String sessionId,
String userName,
long processingTimeMillis,
Throwable failureCause)
Create a new ServletRequestHandledEvent.
|
ServletRequestHandledEvent(Object source,
String requestUrl,
String clientAddress,
String method,
String servletName,
String sessionId,
String userName,
long processingTimeMillis,
Throwable failureCause,
int statusCode)
Create a new ServletRequestHandledEvent.
|
Modifier and Type | Method and Description |
---|---|
String |
getClientAddress()
Return the IP address that the request came from.
|
String |
getDescription()
Return a full description of this event, involving
all available context data.
|
String |
getMethod()
Return the HTTP method of the request (usually GET or POST).
|
String |
getRequestUrl()
Return the URL of the request.
|
String |
getServletName()
Return the name of the servlet that handled the request.
|
String |
getShortDescription()
Return a short description of this event, only involving
the most important context data.
|
int |
getStatusCode()
Return the HTTP status code of the response or -1 if the status
code is not available.
|
String |
toString() |
getFailureCause, getProcessingTimeMillis, getSessionId, getUserName, wasFailure
getTimestamp
getSource
public ServletRequestHandledEvent(Object source, String requestUrl, String clientAddress, String method, String servletName, @Nullable String sessionId, @Nullable String userName, long processingTimeMillis)
source
- the component that published the eventrequestUrl
- the URL of the requestclientAddress
- the IP address that the request came frommethod
- the HTTP method of the request (usually GET or POST)servletName
- the name of the servlet that handled the requestsessionId
- the id of the HTTP session, if anyuserName
- the name of the user that was associated with the
request, if any (usually the UserPrincipal)processingTimeMillis
- the processing time of the request in millisecondspublic ServletRequestHandledEvent(Object source, String requestUrl, String clientAddress, String method, String servletName, @Nullable String sessionId, @Nullable String userName, long processingTimeMillis, @Nullable Throwable failureCause)
source
- the component that published the eventrequestUrl
- the URL of the requestclientAddress
- the IP address that the request came frommethod
- the HTTP method of the request (usually GET or POST)servletName
- the name of the servlet that handled the requestsessionId
- the id of the HTTP session, if anyuserName
- the name of the user that was associated with the
request, if any (usually the UserPrincipal)processingTimeMillis
- the processing time of the request in millisecondsfailureCause
- the cause of failure, if anypublic ServletRequestHandledEvent(Object source, String requestUrl, String clientAddress, String method, String servletName, @Nullable String sessionId, @Nullable String userName, long processingTimeMillis, @Nullable Throwable failureCause, int statusCode)
source
- the component that published the eventrequestUrl
- the URL of the requestclientAddress
- the IP address that the request came frommethod
- the HTTP method of the request (usually GET or POST)servletName
- the name of the servlet that handled the requestsessionId
- the id of the HTTP session, if anyuserName
- the name of the user that was associated with the
request, if any (usually the UserPrincipal)processingTimeMillis
- the processing time of the request in millisecondsfailureCause
- the cause of failure, if anystatusCode
- the HTTP status code of the responsepublic String getRequestUrl()
public String getClientAddress()
public String getMethod()
public String getServletName()
public int getStatusCode()
public String getShortDescription()
RequestHandledEvent
getShortDescription
in class RequestHandledEvent
public String getDescription()
RequestHandledEvent
getDescription
in class RequestHandledEvent
public String toString()
toString
in class RequestHandledEvent