From d4617f242cfcb5712040e2229f06a26fd24cffb0 Mon Sep 17 00:00:00 2001 From: David Montgomery Date: Tue, 5 Apr 2022 11:05:24 -0700 Subject: [PATCH] Added API docs for GrpcChannel. --- runtime/src/main/scala/akka/grpc/GrpcChannel.scala | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/runtime/src/main/scala/akka/grpc/GrpcChannel.scala b/runtime/src/main/scala/akka/grpc/GrpcChannel.scala index 706939842..b403ff80a 100644 --- a/runtime/src/main/scala/akka/grpc/GrpcChannel.scala +++ b/runtime/src/main/scala/akka/grpc/GrpcChannel.scala @@ -21,17 +21,31 @@ final class GrpcChannel private ( Grpc(sys).registerChannel(this) + /** + * Java API: Initiates a shutdown in which preexisting and new calls are cancelled. + */ def closeCS(): CompletionStage[Done] = close().toJava + /** + * Java API: Returns a CompletionStage that completes successfully when channel is shut down via close(), + * or exceptionally if connection cannot be established or reestablished after maxConnectionAttempts. + */ def closedCS(): CompletionStage[Done] = closed().toJava + /** + * Scala API: Initiates a shutdown in which preexisting and new calls are cancelled. + */ def close(): Future[akka.Done] = { Grpc(sys).deregisterChannel(this) ChannelUtils.close(internalChannel) } + /** + * Scala API: Returns a Future that completes successfully when channel is shut down via close() + * or exceptionally if a connection cannot be established or reestablished after maxConnectionAttempts. + */ def closed(): Future[akka.Done] = internalChannel.done }