Class FaultToleranceServiceImpl
- java.lang.Object
-
- fish.payara.microprofile.faulttolerance.service.FaultToleranceServiceImpl
-
- All Implemented Interfaces:
FaultToleranceService
,FaultToleranceRequestTracing
,fish.payara.monitoring.collect.MonitoringDataSource
,EventListener
@ContractsProvided(FaultToleranceService.class) @Service(name="microprofile-fault-tolerance-service") @RunLevel(10) public class FaultToleranceServiceImpl extends Object implements EventListener, FaultToleranceService, fish.payara.monitoring.collect.MonitoringDataSource, FaultToleranceRequestTracing
Base Service for MicroProfile Fault Tolerance.- Author:
- Andrew Pielage, Jan Bernitt (2.0)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.api.event.EventListener
EventListener.Event<T>
-
-
Constructor Summary
Constructors Constructor Description FaultToleranceServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collect(fish.payara.monitoring.collect.MonitoringDataCollector collector)
void
endSpan()
void
event(EventListener.Event<?> event)
Process a Glassfish/Payara eventFaultToleranceConfig
getConfig(jakarta.interceptor.InvocationContext context, Stereotypes stereotypes)
Creates an instance of aFaultToleranceConfig
bound to the givenInvocationContext
andStereotypes
lookup.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
.void
postConstruct()
void
startSpan(RequestTraceSpan span, jakarta.interceptor.InvocationContext context)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface fish.payara.microprofile.faulttolerance.FaultToleranceService
getMethodContext
-
-
-
-
Method Detail
-
postConstruct
@PostConstruct public void postConstruct()
-
event
public void event(EventListener.Event<?> event)
Description copied from interface:EventListener
Process a Glassfish/Payara event- Specified by:
event
in interfaceEventListener
-
collect
public void collect(fish.payara.monitoring.collect.MonitoringDataCollector collector)
- Specified by:
collect
in interfacefish.payara.monitoring.collect.MonitoringDataSource
-
getConfig
public FaultToleranceConfig getConfig(jakarta.interceptor.InvocationContext context, Stereotypes stereotypes)
Description copied from interface:FaultToleranceService
Creates an instance of aFaultToleranceConfig
bound to the givenInvocationContext
andStereotypes
lookup.- Specified by:
getConfig
in interfaceFaultToleranceService
- Parameters:
context
- currently processed contextstereotypes
- way to lookup sterotype annotations- Returns:
- a thread safe
FaultToleranceConfig
instance bound to the given context
-
startSpan
public void startSpan(RequestTraceSpan span, jakarta.interceptor.InvocationContext context)
- Specified by:
startSpan
in interfaceFaultToleranceRequestTracing
-
endSpan
public void endSpan()
- Specified by:
endSpan
in interfaceFaultToleranceRequestTracing
-
getMethodContext
public FaultToleranceMethodContext getMethodContext(jakarta.interceptor.InvocationContext context, FaultTolerancePolicy policy, jakarta.enterprise.context.control.RequestContextController requestContextController)
Description copied from interface:FaultToleranceService
Get or create the context object for processing the annotated method represented by the givenInvocationContext
.- Specified by:
getMethodContext
in interfaceFaultToleranceService
- 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.
-
-