Package io.servicetalk.grpc.api
Interface GrpcClient<BlockingClient extends BlockingGrpcClient>
-
- Type Parameters:
BlockingClient- The correspondingBlockingGrpcClient
- All Superinterfaces:
AsyncCloseable,java.lang.AutoCloseable,GracefulAutoCloseable,ListenableAsyncCloseable
public interface GrpcClient<BlockingClient extends BlockingGrpcClient> extends ListenableAsyncCloseable, GracefulAutoCloseable
A client to a gRPC service.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description BlockingClientasBlockingClient()Converts thisGrpcClientto a blocking client.default voidclose()GrpcExecutionContextexecutionContext()Get theGrpcExecutionContextused during construction of this object.-
Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsync, closeAsyncGracefully
-
Methods inherited from interface io.servicetalk.concurrent.GracefulAutoCloseable
closeGracefully
-
Methods inherited from interface io.servicetalk.concurrent.api.ListenableAsyncCloseable
onClose
-
-
-
-
Method Detail
-
asBlockingClient
BlockingClient asBlockingClient()
Converts thisGrpcClientto a blocking client.- Returns:
- This
GrpcClientas aGrpcClient.
-
executionContext
GrpcExecutionContext executionContext()
Get theGrpcExecutionContextused during construction of this object.Note that the
ExecutionContext.ioExecutor()will not necessarily be associated with a specific thread unless that was how this object was built.- Returns:
- the
GrpcExecutionContextused during construction of this object.
-
close
default void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
-