Package io.micronaut.http.client.sse
Interface SseClientRegistry<E extends SseClient>
- Type Parameters:
E
- Reactive Server Sent Events HTTP Client
- All Known Implementing Classes:
DefaultNettyHttpClientRegistry
public interface SseClientRegistry<E extends SseClient>
Interface for managing the construction and lifecycle of instances of reactive clients.
- Since:
- 3.0.0
- Author:
- Sergio del Amo
-
Method Summary
Modifier and TypeMethodDescriptionvoid
disposeClient
(AnnotationMetadata annotationMetadata) Dispose of the client defined by the given metadata.default E
getSseClient
(@NonNull AnnotationMetadata annotationMetadata) Return the client for the given annotation metadata.resolveSseClient
(@Nullable InjectionPoint<?> injectionPoint, @Nullable LoadBalancer loadBalancer, @Nullable HttpClientConfiguration configuration, @NonNull BeanContext beanContext) Resolves aSseClient
for the given injection point.
-
Method Details
-
resolveSseClient
@NonNull E resolveSseClient(@Nullable @Nullable InjectionPoint<?> injectionPoint, @Nullable @Nullable LoadBalancer loadBalancer, @Nullable @Nullable HttpClientConfiguration configuration, @NonNull @NonNull BeanContext beanContext) Resolves aSseClient
for the given injection point.- Parameters:
injectionPoint
- The injection pointloadBalancer
- The load balancer to use (Optional)configuration
- The configuration (Optional)beanContext
- The bean context to use- Returns:
- The SSE HTTP Client
-
getSseClient
Return the client for the given annotation metadata.- Parameters:
annotationMetadata
- The annotation metadata.- Returns:
- The client
-
disposeClient
Dispose of the client defined by the given metadata.- Parameters:
annotationMetadata
- The annotation metadata
-
getDefaultSseClient
- Returns:
- Return the default Sse HTTP client.
-