Package dev.failsafe.event
Class ExecutionCompletedEvent<R>
- java.lang.Object
-
- dev.failsafe.event.ExecutionEvent
-
- dev.failsafe.event.ExecutionCompletedEvent<R>
-
- Type Parameters:
R
- result type
public class ExecutionCompletedEvent<R> extends ExecutionEvent
Indicates an execution was completed or cancelled.
-
-
Constructor Summary
Constructors Constructor Description ExecutionCompletedEvent(R result, java.lang.Throwable exception, ExecutionContext<R> context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Throwable
getException()
Returns the failure that preceded the event, elsenull
if there was none.R
getResult()
Returns the result that preceded the event, elsenull
if there was none.java.lang.String
toString()
-
Methods inherited from class dev.failsafe.event.ExecutionEvent
getAttemptCount, getElapsedAttemptTime, getElapsedTime, getExecutionCount, getStartTime, isFirstAttempt, isRetry
-
-
-
-
Field Detail
-
result
private final R result
-
exception
private final java.lang.Throwable exception
-
-
Constructor Detail
-
ExecutionCompletedEvent
public ExecutionCompletedEvent(R result, java.lang.Throwable exception, ExecutionContext<R> context)
-
-
Method Detail
-
getException
public java.lang.Throwable getException()
Returns the failure that preceded the event, elsenull
if there was none.
-
getResult
public R getResult()
Returns the result that preceded the event, elsenull
if there was none.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-