Package com.google.api.gax.grpc
Class GrpcTransportChannel
- java.lang.Object
-
- com.google.api.gax.grpc.GrpcTransportChannel
-
- All Implemented Interfaces:
com.google.api.gax.core.BackgroundResource,com.google.api.gax.rpc.TransportChannel,AutoCloseable
@InternalExtensionOnly public abstract class GrpcTransportChannel extends Object implements com.google.api.gax.rpc.TransportChannel
Implementation of TransportChannel based on gRPC.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGrpcTransportChannel.Builder
-
Constructor Summary
Constructors Constructor Description GrpcTransportChannel()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanawaitTermination(long duration, TimeUnit unit)voidclose()static GrpcTransportChannelcreate(io.grpc.ManagedChannel channel)io.grpc.ChannelgetChannel()GrpcCallContextgetEmptyCallContext()static StringgetGrpcTransportName()The name of the Grpc transport.StringgetTransportName()booleanisShutdown()booleanisTerminated()static GrpcTransportChannel.BuildernewBuilder()voidshutdown()voidshutdownNow()
-
-
-
Method Detail
-
getGrpcTransportName
public static String getGrpcTransportName()
The name of the Grpc transport.
-
getTransportName
public String getTransportName()
- Specified by:
getTransportNamein interfacecom.google.api.gax.rpc.TransportChannel
-
getEmptyCallContext
public GrpcCallContext getEmptyCallContext()
- Specified by:
getEmptyCallContextin interfacecom.google.api.gax.rpc.TransportChannel
-
getChannel
public io.grpc.Channel getChannel()
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfacecom.google.api.gax.core.BackgroundResource
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdownin interfacecom.google.api.gax.core.BackgroundResource
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminatedin interfacecom.google.api.gax.core.BackgroundResource
-
shutdownNow
public void shutdownNow()
- Specified by:
shutdownNowin interfacecom.google.api.gax.core.BackgroundResource
-
awaitTermination
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException- Specified by:
awaitTerminationin interfacecom.google.api.gax.core.BackgroundResource- Throws:
InterruptedException
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
newBuilder
public static GrpcTransportChannel.Builder newBuilder()
-
create
public static GrpcTransportChannel create(io.grpc.ManagedChannel channel)
-
-