Class MethodFailureEvent

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.context.event.MethodFailureEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MethodRetryEvent, MethodRollbackEvent

public class MethodFailureEvent extends ApplicationEvent
Event indicating a method invocation that failed.
Since:
7.0.3
Author:
Juergen Hoeller
See Also:
  • Constructor Details

    • MethodFailureEvent

      public MethodFailureEvent(MethodInvocation invocation, Throwable failure)
      Create a new event for the given method invocation.
      Parameters:
      invocation - the method invocation
      failure - the exception encountered
  • Method Details

    • getSource

      public MethodInvocation getSource()
      Return the method invocation that triggered this event.
      Overrides:
      getSource in class EventObject
    • getMethod

      public Method getMethod()
      Return the method that triggered this event.
    • getFailure

      public Throwable getFailure()
      Return the exception encountered.
    • toString

      public String toString()
      Overrides:
      toString in class EventObject