Class HealthCheckingLoadBalancerFactory.HealthCheckState.HcStream

java.lang.Object
io.grpc.ClientCall.Listener<HealthCheckResponse>
io.grpc.protobuf.services.HealthCheckingLoadBalancerFactory.HealthCheckState.HcStream
Enclosing class:
HealthCheckingLoadBalancerFactory.HealthCheckState

private class HealthCheckingLoadBalancerFactory.HealthCheckState.HcStream extends ClientCall.Listener<HealthCheckResponse>
  • Field Details

  • Constructor Details

    • HcStream

      HcStream()
  • Method Details

    • start

      void start()
    • cancel

      void cancel(String msg)
    • onMessage

      public void onMessage(HealthCheckResponse response)
      Description copied from class: ClientCall.Listener
      A response message has been received. May be called zero or more times depending on whether the call response is empty, a single message or a stream of messages.
      Overrides:
      onMessage in class ClientCall.Listener<HealthCheckResponse>
      Parameters:
      response - returned by the server
    • onClose

      public void onClose(Status status, Metadata trailers)
      Description copied from class: ClientCall.Listener
      The ClientCall has been closed. Any additional calls to the ClientCall will not be processed by the server. No further receiving will occur and no further notifications will be made.

      Since Metadata is not thread-safe, the caller must not access (read or write) trailers after this point.

      If status returns false for Status.isOk(), then the call failed. An additional block of trailer metadata may be received at the end of the call from the server. An empty Metadata object is passed if no trailers are received.

      This method should not throw. If this method throws, there is no way to be notified of the exception. Implementations should therefore be careful of exceptions which can accidentally leak resources.

      Overrides:
      onClose in class ClientCall.Listener<HealthCheckResponse>
      Parameters:
      status - the result of the remote call.
      trailers - metadata provided at call completion.
    • handleResponse

      void handleResponse(HealthCheckResponse response)
    • handleStreamClosed

      void handleStreamClosed(Status status)
    • toString

      public String toString()
      Overrides:
      toString in class Object