@FunctionalInterface
public static interface Health.BlockingWatchRpc
extends BlockingGrpcService
| Modifier and Type | Field and Description |
|---|---|
static String |
PATH
Deprecated.
Use
methodDescriptor(). |
| Modifier and Type | Method and Description |
|---|---|
static MethodDescriptor<HealthCheckRequest,HealthCheckResponse> |
methodDescriptor() |
default 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)
Deprecated.
Use
watch(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 maintain FunctionalInterface contract that requires to have a single non-default method. |
@Deprecated static final String PATH
methodDescriptor().static MethodDescriptor<HealthCheckRequest,HealthCheckResponse> methodDescriptor()
@Deprecated
void watch(GrpcServiceContext ctx,
HealthCheckRequest request,
GrpcPayloadWriter<HealthCheckResponse> responseWriter)
throws Exception
watch(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 maintain FunctionalInterface 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.
ctx - context associated with this service and request.request - the request from the client.responseWriter - used to write a stream of type HealthCheckResponse to the client.
The implementation of this method is responsible for calling Closeable.close().Exception - if an unexpected application error occurs.GrpcStatusException - if an expected application exception occurs. Its contents will be serialized and propagated to the peer.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.
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 type HealthCheckResponse to the client.
The implementation of this method is responsible for calling Closeable.close().Exception - if an unexpected application error occurs.GrpcStatusException - if an expected application exception occurs. Its contents will be serialized and propagated to the peer.