public interface GrpcChannelFactory
extends java.lang.AutoCloseable
Channel
s for a given service name. Implementations are encouraged to utilize
connection pooling and thus close
should be called before disposing it.Modifier and Type | Method and Description |
---|---|
io.grpc.Channel |
createChannel(java.lang.String name)
Creates a new channel for the given service name.
|
io.grpc.Channel |
createChannel(java.lang.String name,
java.util.List<io.grpc.ClientInterceptor> interceptors)
Creates a new channel for the given service name.
|
io.grpc.Channel createChannel(java.lang.String name)
ClientInterceptor
s.
Note: The underlying implementation might reuse existing ManagedChannel
s allow connection reuse.
name
- The name of the service.io.grpc.Channel createChannel(java.lang.String name, java.util.List<io.grpc.ClientInterceptor> interceptors)
ClientInterceptor
s.
Note: The underlying implementation might reuse existing ManagedChannel
s allow connection reuse.
Note: The given interceptors will be applied after the global interceptors. But the interceptors that were applied last, will be called first.
name
- The name of the service.interceptors
- A list of additional client interceptors that should be added to the channel.