FallbackHandler#handle(ExecutionContext) on the specified handler to execute
the fallback.org.eclipse.microprofile.faulttolerance.exceptions.FaultToleranceDefinitionException must be thrown.When a method returns and the fallback policy is present, the following rules are applied:
skipOn() parameter, the thrown object
will be rethrown.
applyOn() parameter, the fallback
policy, detailed above, will be applied.
Throwable which is not an Error or Exception, non-portable behavior
results.
value(), fallbackMethod(), applyOn(), skipOn()
| Modifier and Type | Class and Description |
|---|---|
| public static class | Fallback.
Create a default class so the value is not required to be set all the time. |
| Modifier and Type | Method and Description |
|---|---|
| public Class | |
| public String | |
| public Class | |
| public Class |
| applyOn | back to summary |
|---|---|
| public Class The list of exception types which should trigger Fallback
Note that if a method throws a | |
| fallbackMethod | back to summary |
|---|---|
| public String fallbackMethod() Specify the method name to fallback to. This method belongs to the same class as the method to fallback. The
method must have the exact same arguments as the method being annotated. The method return type must be
assignable to the return type of the method the fallback is for. Otherwise,
| |
| skipOn | back to summary |
|---|---|
| public Class The list of exception types which should not trigger Fallback
This list takes priority over the types listed in
Note that if a method throws a | |
| value | back to summary |
|---|---|
| public Class Specify the fallback class to be used. A new instance of the fallback class is returned. The instance is
unmanaged. The type parameter of the fallback class must be assignable to the return type of the annotated
method. Otherwise,
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Void | handle(ExecutionContext
the execution context context)Implements org. Handle the previous calling failure and then call alternative methods or perform any alternative operations. |
| DEFAULT | back to summary |
|---|---|
| public DEFAULT() | |
| handle | back to summary |
|---|---|
| public Void handle(ExecutionContext context) Implements org. Doc from org. Handle the previous calling failure and then call alternative methods or perform any alternative operations.
| |