Package io.micronaut.retry.event
Class CircuitOpenEvent
java.lang.Object
java.util.EventObject
io.micronaut.context.event.ApplicationEvent
io.micronaut.retry.event.CircuitOpenEvent
- All Implemented Interfaces:
Serializable
public class CircuitOpenEvent
extends io.micronaut.context.event.ApplicationEvent
An event fired when the Circuit is
CircuitState.OPEN and
requests are no longer being accepted.- Since:
- 1.0
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionCircuitOpenEvent(io.micronaut.inject.ExecutableMethod<?, ?> source, RetryState retryState, Throwable throwable) -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.inject.ExecutableMethod<?, ?> Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
CircuitOpenEvent
public CircuitOpenEvent(io.micronaut.inject.ExecutableMethod<?, ?> source, RetryState retryState, Throwable throwable) - Parameters:
source- A compile time produced invocation of a method callretryState- Encapsulate the current state ofRetryableoperation.throwable- The cause
-
-
Method Details
-
getRetryState
- Returns:
- The retry context
-
getThrowable
- Returns:
- The original exception that will be rethrown to the user
-
getSource
public io.micronaut.inject.ExecutableMethod<?,?> getSource()- Overrides:
getSourcein classEventObject- Returns:
- The method that represents the circuit
-