public final class GrpcChannel
extends io.grpc.Channel
GrpcServer
.Constructor and Description |
---|
GrpcChannel(GrpcChannelKey channelKey,
AuthenticatedChannel channel,
long shutdownTimeoutMs)
Create a new instance of
GrpcChannel with an authenticated channel. |
GrpcChannel(GrpcChannelKey channelKey,
io.grpc.Channel channel,
long shutdownTimeoutMs)
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(GrpcChannelKey channelKey, io.grpc.Channel channel, long shutdownTimeoutMs)
GrpcChannel
.channelKey
- the channel keychannel
- the grpc channel to wrapshutdownTimeoutMs
- shutdown timeout in millisecondspublic GrpcChannel(GrpcChannelKey channelKey, AuthenticatedChannel channel, long shutdownTimeoutMs)
GrpcChannel
with an authenticated channel.channelKey
- the channel keychannel
- the authenticated grpc channelshutdownTimeoutMs
- shutdown timeout in millisecondspublic <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.