Class AdapterDetector
java.lang.Object
io.apicurio.registry.client.common.AdapterDetector
Utility class for detecting available HTTP adapters at runtime.
This enables the SDK to work with either Vert.x or JDK HTTP adapter
depending on which dependencies are available on the classpath.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanChecks if the JDK HTTP adapter is available on the classpath.static booleanChecks if the Vert.x HTTP adapter is available on the classpath.static HttpAdapterTyperesolveAdapterType(HttpAdapterType requested) Resolves the actual adapter type to use based on the requested type and available adapters on the classpath.
-
Method Details
-
isVertxAvailable
public static boolean isVertxAvailable()Checks if the Vert.x HTTP adapter is available on the classpath.- Returns:
- true if kiota-http-vertx is available
-
isJdkAdapterAvailable
public static boolean isJdkAdapterAvailable()Checks if the JDK HTTP adapter is available on the classpath.- Returns:
- true if kiota-http-jdk is available
-
resolveAdapterType
Resolves the actual adapter type to use based on the requested type and available adapters on the classpath.- Parameters:
requested- the requested adapter type from options- Returns:
- the resolved adapter type to use
- Throws:
IllegalStateException- if AUTO is requested but no adapter is available, or if a specific adapter is requested but not available
-