public class ServletRequestHandledEvent extends RequestHandledEvent
FrameworkServlet
,
ApplicationEventPublisher.publishEvent(org.springframework.context.ApplicationEvent)
,
Serialized FormModifier and Type | Field and Description |
---|---|
private java.lang.String |
clientAddress
IP address that the request came from
|
private java.lang.String |
method
Usually GET or POST
|
private java.lang.String |
requestUrl
URL that triggered the request
|
private java.lang.String |
servletName
Name of the servlet that handled the request
|
private int |
statusCode
HTTP status code of the response
|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
int |
getStatusCode()
Return the HTTP status code of the response or -1 if the status
code is not available.
|
java.lang.String |
toString() |
getFailureCause, getProcessingTimeMillis, getSessionId, getUserName, wasFailure
getTimestamp
private final java.lang.String requestUrl
private final java.lang.String clientAddress
private final java.lang.String method
private final java.lang.String servletName
private final int statusCode
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)
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(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)
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(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)
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 java.lang.String getRequestUrl()
public java.lang.String getClientAddress()
public java.lang.String getMethod()
public java.lang.String getServletName()
public int getStatusCode()
public java.lang.String getShortDescription()
RequestHandledEvent
getShortDescription
in class RequestHandledEvent
public java.lang.String getDescription()
RequestHandledEvent
getDescription
in class RequestHandledEvent
public java.lang.String toString()
toString
in class RequestHandledEvent