Package com.google.api.gax.grpc
Class GrpcTransportChannel
- java.lang.Object
-
- com.google.api.gax.grpc.GrpcTransportChannel
-
- All Implemented Interfaces:
BackgroundResource,TransportChannel,AutoCloseable
@InternalExtensionOnly public abstract class GrpcTransportChannel extends Object implements 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 interfaceTransportChannel
-
getEmptyCallContext
public GrpcCallContext getEmptyCallContext()
- Specified by:
getEmptyCallContextin interfaceTransportChannel
-
getChannel
public io.grpc.Channel getChannel()
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()
- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException- Specified by:
awaitTerminationin interfaceBackgroundResource- 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)
-
-