Class PayaraTracingServices
- java.lang.Object
-
- fish.payara.requesttracing.jaxrs.client.PayaraTracingServices
-
public final class PayaraTracingServices extends Object
This is a class hiding internal mechanism of lookup of HK2 services. The required services will be eagerly initialised using their service handles, and throwing an exception if the handle is available but not the service itself.- Author:
- David Matejcek
-
-
Constructor Summary
Constructors Constructor Description PayaraTracingServices()
Initialise the tracing services if they are available.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.opentracing.Tracer
getActiveTracer()
String
getApplicationName()
Deployment
getDeployment()
InvocationManager
getInvocationManager()
OpenTracingService
getOpenTracingService()
RequestTracingService
getRequestTracingService()
boolean
isTracingAvailable()
-
-
-
Constructor Detail
-
PayaraTracingServices
public PayaraTracingServices()
Initialise the tracing services if they are available.- Throws:
RuntimeException
- if an exception occurs initialising the services.
-
-
Method Detail
-
isTracingAvailable
public boolean isTracingAvailable()
- Returns:
- true if the Request Tracing services are available and have been initialised, or false if the services are not available.
-
getRequestTracingService
public RequestTracingService getRequestTracingService()
- Returns:
RequestTracingService
, or null if the HK2 service couldn't be initialised.
-
getOpenTracingService
public OpenTracingService getOpenTracingService()
- Returns:
OpenTracingService
, or null if the HK2 service couldn't be initialised.
-
getInvocationManager
public InvocationManager getInvocationManager()
- Returns:
InvocationManager
-
getDeployment
public Deployment getDeployment()
- Returns:
Deployment
-
getApplicationName
public String getApplicationName()
- Returns:
- application name known to the actual
InvocationManager
, or null if no invocation manager can be found.
-
getActiveTracer
public io.opentracing.Tracer getActiveTracer()
- Returns:
- actually active
Tracer
for the current application, or null if the tracing service is not available.
-
-