Package io.servicetalk.health.v1
Interface Health.BlockingWatchRpc
- All Superinterfaces:
AutoCloseable
,BlockingGrpcService
,GracefulAutoCloseable
- All Known Subinterfaces:
Health.BlockingHealthService
- Enclosing class:
- Health
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
watch
(GrpcServiceContext ctx, HealthCheckRequest request, BlockingStreamingGrpcServerResponse<HealthCheckResponse> response) Performs a watch for the serving status of the requested service.void
watch
(GrpcServiceContext ctx, HealthCheckRequest request, GrpcPayloadWriter<HealthCheckResponse> responseWriter) Methods inherited from interface io.servicetalk.grpc.api.BlockingGrpcService
close
Methods inherited from interface io.servicetalk.concurrent.GracefulAutoCloseable
closeGracefully
-
Field Details
-
PATH
Deprecated.UsemethodDescriptor()
.- See Also:
-
-
Method Details
-
methodDescriptor
-
watch
@Deprecated void watch(GrpcServiceContext ctx, HealthCheckRequest request, GrpcPayloadWriter<HealthCheckResponse> responseWriter) throws Exception Deprecated.Usewatch(GrpcServiceContext, HealthCheckRequest, BlockingStreamingGrpcServerResponse)
. In the next release, this method will have a default implementation but the new overload won't. To avoid breaking API changes, make sure to implement both methods. The release after next will remove this method. This intermediate step is necessary to maintainFunctionalInterface
contract that requires to have a single non-default method.Performs a watch for the serving status of the requested service. The server will immediately send back a message indicating the current serving status. It will then subsequently send a new message whenever the service's serving status changes. If the requested service is unknown when the call is received, the server will send a message setting the serving status to SERVICE_UNKNOWN but will *not* terminate the call. If at some future point, the serving status of the service becomes known, the server will send a new message with the service's serving status. If the call terminates with status UNIMPLEMENTED, then clients should assume this method is not supported and should not retry the call. If the call terminates with any other status (including OK), clients should retry the call with appropriate exponential backoff.
- Parameters:
ctx
- context associated with this service and request.request
- the request from the client.responseWriter
- used to write a stream of typeHealthCheckResponse
to the client. The implementation of this method is responsible for callingCloseable.close()
.- Throws:
Exception
- if an unexpected application error occurs.GrpcStatusException
- if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
-
watch
default void watch(GrpcServiceContext ctx, HealthCheckRequest request, BlockingStreamingGrpcServerResponse<HealthCheckResponse> response) throws Exception Performs a watch for the serving status of the requested service. The server will immediately send back a message indicating the current serving status. It will then subsequently send a new message whenever the service's serving status changes. If the requested service is unknown when the call is received, the server will send a message setting the serving status to SERVICE_UNKNOWN but will *not* terminate the call. If at some future point, the serving status of the service becomes known, the server will send a new message with the service's serving status. If the call terminates with status UNIMPLEMENTED, then clients should assume this method is not supported and should not retry the call. If the call terminates with any other status (including OK), clients should retry the call with appropriate exponential backoff.
- Parameters:
ctx
- context associated with this service and request.request
- the request from the client.response
- used to send response meta-data and continue writing a stream of typeHealthCheckResponse
to the client. The implementation of this method is responsible for callingCloseable.close()
.- Throws:
Exception
- if an unexpected application error occurs.GrpcStatusException
- if an expected application exception occurs. Its contents will be serialized and propagated to the peer.
-
methodDescriptor()
.