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
Event indicating a method invocation that failed.
- Since:
- 7.0.3
- Author:
- Juergen Hoeller
- See Also:
-
Field Summary
Fields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionMethodFailureEvent(MethodInvocation invocation, Throwable failure) Create a new event for the given method invocation. -
Method Summary
Modifier and TypeMethodDescriptionReturn the exception encountered.Return the method that triggered this event.Return the method invocation that triggered this event.toString()Methods inherited from class ApplicationEvent
getTimestamp
-
Constructor Details
-
MethodFailureEvent
Create a new event for the given method invocation.- Parameters:
invocation- the method invocationfailure- the exception encountered
-
-
Method Details
-
getSource
Return the method invocation that triggered this event.- Overrides:
getSourcein classEventObject
-
getMethod
Return the method that triggered this event. -
getFailure
Return the exception encountered. -
toString
- Overrides:
toStringin classEventObject
-