Interface FaultToleranceService
-
- All Known Implementing Classes:
FaultToleranceServiceImpl
public interface FaultToleranceService
Essentially a list of all methods needed to process FT behaviour. Decouples the FT processing facilities and state from any specific implementation to allow e.g. unit testing.- Author:
- Jan Bernitt
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description FaultToleranceConfig
getConfig(jakarta.interceptor.InvocationContext context, Stereotypes stereotypes)
Creates an instance of aFaultToleranceConfig
bound to the givenInvocationContext
andStereotypes
lookup.default FaultToleranceMethodContext
getMethodContext(jakarta.interceptor.InvocationContext context, FaultTolerancePolicy policy)
FaultToleranceMethodContext
getMethodContext(jakarta.interceptor.InvocationContext context, FaultTolerancePolicy policy, jakarta.enterprise.context.control.RequestContextController requestContextController)
Get or create the context object for processing the annotated method represented by the givenInvocationContext
.
-
-
-
Method Detail
-
getConfig
FaultToleranceConfig getConfig(jakarta.interceptor.InvocationContext context, Stereotypes stereotypes)
Creates an instance of aFaultToleranceConfig
bound to the givenInvocationContext
andStereotypes
lookup.- Parameters:
context
- currently processed contextstereotypes
- way to lookup sterotype annotations- Returns:
- a thread safe
FaultToleranceConfig
instance bound to the given context
-
getMethodContext
FaultToleranceMethodContext getMethodContext(jakarta.interceptor.InvocationContext context, FaultTolerancePolicy policy, jakarta.enterprise.context.control.RequestContextController requestContextController)
Get or create the context object for processing the annotated method represented by the givenInvocationContext
.- Parameters:
context
- represents the FT annotated method being calledpolicy
- the policy being used for this executionrequestContextController
- the controller to use or null- Returns:
- the
FaultToleranceMethodContext
to use to process the method invocation with FT semantics. This is a context specific to the target object and called method.
-
getMethodContext
default FaultToleranceMethodContext getMethodContext(jakarta.interceptor.InvocationContext context, FaultTolerancePolicy policy)
-
-