org.springframework.web.context.support

Class RequestHandledEvent

    • Field Summary

      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor and Description
      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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      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 java.util.EventObject

        getSource
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RequestHandledEvent

        public RequestHandledEvent(java.lang.Object source,
                                   @Nullable
                                   java.lang.String sessionId,
                                   @Nullable
                                   java.lang.String userName,
                                   long processingTimeMillis)
        Create a new RequestHandledEvent with session information.
        Parameters:
        source - the component that published the event
        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
      • RequestHandledEvent

        public RequestHandledEvent(java.lang.Object source,
                                   @Nullable
                                   java.lang.String sessionId,
                                   @Nullable
                                   java.lang.String userName,
                                   long processingTimeMillis,
                                   @Nullable
                                   java.lang.Throwable failureCause)
        Create a new RequestHandledEvent with session information.
        Parameters:
        source - the component that published the event
        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

      • getProcessingTimeMillis

        public long getProcessingTimeMillis()
        Return the processing time of the request in milliseconds.
      • getSessionId

        @Nullable
        public java.lang.String getSessionId()
        Return the id of the HTTP session, if any.
      • wasFailure

        public boolean wasFailure()
        Return whether the request failed.
      • getFailureCause

        @Nullable
        public java.lang.Throwable getFailureCause()
        Return the cause of failure, if any.
      • getShortDescription

        public java.lang.String getShortDescription()
        Return a short description of this event, only involving the most important context data.
      • getDescription

        public java.lang.String getDescription()
        Return a full description of this event, involving all available context data.
      • toString

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