Supported by Spring's own FrameworkServlet (through a specific ServletRequestHandledEvent subclass), but can also be raised by any other web component.
ServletRequestHandledEvent, org.springframework.web.servlet.FrameworkServlet , org.springframework.context.ApplicationContext#publishEvent
| Modifier and Type | Field and Description |
|---|---|
| private Throwable | failureCause
Cause of failure, if any. |
| private final long | processingTimeMillis
Request processing time. |
| private final String | sessionId
Session id that applied to the request, if any. |
| private final String | userName
Usually the UserPrincipal. |
| Access | Constructor and Description |
|---|---|
| public | RequestHandledEvent(Object
the component that published the event source, String the id of the HTTP session, if any sessionId, String the name of the user that was associated with the
request, if any (usually the UserPrincipal) userName, long the processing time of the request in milliseconds processingTimeMillis)Create a new RequestHandledEvent with session information. |
| public | RequestHandledEvent(Object
the component that published the event source, String the id of the HTTP session, if any sessionId, String the name of the user that was associated with the
request, if any (usually the UserPrincipal) userName, long the processing time of the request in milliseconds processingTimeMillis, Throwable the cause of failure, if any failureCause)Create a new RequestHandledEvent with session information. |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public Throwable | |
| public long | |
| public String | |
| public String | getShortDescription()
Return a short description of this event, only involving the most important context data. |
| public String | getUserName()
Return the name of the user that was associated with the request (usually the UserPrincipal). |
| public String | toString()
Overrides java. |
| public boolean |
| failureCause | back to summary |
|---|---|
| private Throwable failureCause Cause of failure, if any. | |
| processingTimeMillis | back to summary |
|---|---|
| private final long processingTimeMillis Request processing time. | |
| sessionId | back to summary |
|---|---|
| private final String sessionId Session id that applied to the request, if any. | |
| userName | back to summary |
|---|---|
| private final String userName Usually the UserPrincipal. | |
| RequestHandledEvent | back to summary |
|---|---|
| public RequestHandledEvent(Object source, String sessionId, String userName, long processingTimeMillis) Create a new RequestHandledEvent with session information. | |
| RequestHandledEvent | back to summary |
|---|---|
| public RequestHandledEvent(Object source, String sessionId, String userName, long processingTimeMillis, Throwable failureCause) Create a new RequestHandledEvent with session information.
| |
| getDescription | back to summary |
|---|---|
| public String getDescription() Return a full description of this event, involving all available context data. | |
| getFailureCause | back to summary |
|---|---|
| public Throwable getFailureCause() Return the cause of failure, if any.
| |
| getProcessingTimeMillis | back to summary |
|---|---|
| public long getProcessingTimeMillis() Return the processing time of the request in milliseconds. | |
| getSessionId | back to summary |
|---|---|
| public String getSessionId() Return the id of the HTTP session, if any.
| |
| getShortDescription | back to summary |
|---|---|
| public String getShortDescription() Return a short description of this event, only involving the most important context data. | |
| getUserName | back to summary |
|---|---|
| public String getUserName() Return the name of the user that was associated with the request (usually the UserPrincipal).
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a String representation of this EventObject. | |
| wasFailure | back to summary |
|---|---|
| public boolean wasFailure() Return whether the request failed. | |