@NotThreadSafe public final class GrpcChannel extends io.grpc.Channel
GrpcServer
.Constructor and Description |
---|
GrpcChannel(GrpcConnection connection,
AuthenticatedChannelClientDriver authDriver)
Create a new instance of
GrpcChannel . |
Modifier and Type | Method and Description |
---|---|
String |
authority() |
void |
intercept(io.grpc.ClientInterceptor interceptor)
Intercepts the channel with given interceptor.
|
boolean |
isHealthy() |
boolean |
isShutdown() |
<RequestT,ResponseT> |
newCall(io.grpc.MethodDescriptor<RequestT,ResponseT> methodDescriptor,
io.grpc.CallOptions callOptions) |
void |
shutdown()
Shuts down the channel.
|
String |
toString() |
String |
toStringShort() |
public GrpcChannel(GrpcConnection connection, @Nullable AuthenticatedChannelClientDriver authDriver)
GrpcChannel
.connection
- the grpc connectionauthDriver
- nullable client-side authentication driverpublic <RequestT,ResponseT> io.grpc.ClientCall<RequestT,ResponseT> newCall(io.grpc.MethodDescriptor<RequestT,ResponseT> methodDescriptor, io.grpc.CallOptions callOptions)
newCall
in class io.grpc.Channel
public String authority()
authority
in class io.grpc.Channel
public void intercept(io.grpc.ClientInterceptor interceptor)
interceptor
- interceptorpublic void shutdown()
public boolean isShutdown()
true
if the channel has been shut downpublic boolean isHealthy()
true
if channel is healthypublic String toStringShort()
Copyright © 2023. All Rights Reserved.