|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject org.springframework.context.ApplicationEvent org.springframework.web.context.support.RequestHandledEvent
public class RequestHandledEvent
Event raised when a request is handled within an ApplicationContext.
Supported by Spring's own FrameworkServlet (through a specific ServletRequestHandledEvent subclass), but can also be raised by any other web component. Used, for example, by Spring's out-of-the-box PerformanceMonitorListener.
ServletRequestHandledEvent
,
FrameworkServlet
,
ApplicationEventPublisher.publishEvent(org.springframework.context.ApplicationEvent)
,
Serialized FormField Summary | |
---|---|
private java.lang.Throwable |
failureCause
Cause of failure, if any |
private long |
processingTimeMillis
Request processing time |
private java.lang.String |
sessionId
Session id that applied to the request, if any |
private java.lang.String |
userName
Usually the UserPrincipal |
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
RequestHandledEvent(java.lang.Object source,
java.lang.String sessionId,
java.lang.String userName,
long processingTimeMillis)
Create a new RequestHandledEvent with session information. |
|
RequestHandledEvent(java.lang.Object source,
java.lang.String sessionId,
java.lang.String userName,
long processingTimeMillis,
java.lang.Throwable failureCause)
Create a new RequestHandledEvent with session information. |
Method Summary | |
---|---|
java.lang.String |
getDescription()
Return a full description of this event, involving all available context data. |
java.lang.Throwable |
getFailureCause()
Return the cause of failure, if any. |
long |
getProcessingTimeMillis()
Return the processing time of the request in milliseconds. |
java.lang.String |
getSessionId()
Return the id of the HTTP session, if any. |
java.lang.String |
getShortDescription()
Return a short description of this event, only involving the most important context data. |
java.lang.String |
getUserName()
Return the name of the user that was associated with the request (usually the UserPrincipal). |
java.lang.String |
toString()
|
boolean |
wasFailure()
Return whether the request failed. |
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 |
Field Detail |
---|
private java.lang.String sessionId
private java.lang.String userName
private final long processingTimeMillis
private java.lang.Throwable failureCause
Constructor Detail |
---|
public RequestHandledEvent(java.lang.Object source, java.lang.String sessionId, java.lang.String userName, long processingTimeMillis)
source
- the component that published the eventsessionId
- 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 RequestHandledEvent(java.lang.Object source, java.lang.String sessionId, java.lang.String userName, long processingTimeMillis, java.lang.Throwable failureCause)
source
- the component that published the eventsessionId
- 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 anyMethod Detail |
---|
public long getProcessingTimeMillis()
public java.lang.String getSessionId()
public java.lang.String getUserName()
javax.servlet.http.HttpServletRequest#getUserPrincipal()
public boolean wasFailure()
public java.lang.Throwable getFailureCause()
public java.lang.String getShortDescription()
public java.lang.String getDescription()
public java.lang.String toString()
toString
in class java.util.EventObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |