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 BlockingClient
asBlockingClient()
Converts thisGrpcClient
to a blocking client.default void
close()
GrpcExecutionContext
executionContext()
Get theGrpcExecutionContext
used 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 thisGrpcClient
to a blocking client.- Returns:
- This
GrpcClient
as aGrpcClient
.
-
executionContext
GrpcExecutionContext executionContext()
Get theGrpcExecutionContext
used 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
GrpcExecutionContext
used during construction of this object.
-
close
default void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
-