Package io.micronaut.grpc.channels
Class GrpcManagedChannelConfiguration
java.lang.Object
io.micronaut.grpc.channels.GrpcManagedChannelConfiguration
- All Implemented Interfaces:
io.micronaut.core.naming.Named
- Direct Known Subclasses:
GrpcDefaultManagedChannelConfiguration
,GrpcNamedManagedChannelConfiguration
public abstract class GrpcManagedChannelConfiguration
extends Object
implements io.micronaut.core.naming.Named
A managed channel configuration.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
GrpcManagedChannelConfiguration
(String name, io.micronaut.context.env.Environment env, ExecutorService executorService) Constructors a new managed channel configuration. -
Method Summary
-
Field Details
-
PREFIX
- See Also:
-
SETTING_TARGET
- See Also:
-
SETTING_URL
- See Also:
-
CONNECT_ON_STARTUP
- See Also:
-
CONNECTION_TIMEOUT
- See Also:
-
name
-
channelBuilder
@ConfigurationBuilder(prefixes={"use",""}, allowZeroArgs=true) protected final io.grpc.netty.NettyChannelBuilder channelBuilder
-
-
Constructor Details
-
GrpcManagedChannelConfiguration
protected GrpcManagedChannelConfiguration(String name, io.micronaut.context.env.Environment env, ExecutorService executorService) Constructors a new managed channel configuration.- Parameters:
name
- The nameenv
- The environmentexecutorService
- The executor service to use
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceio.micronaut.core.naming.Named
- Returns:
- name of the channel
-
isConnectOnStartup
public boolean isConnectOnStartup()- Returns:
- true if connect on startup is set for channel
- Since:
- 3.4.0
-
getConnectionTimeout
- Returns:
- connection timeout for the channel
- Since:
- 3.4.0
-
getChannelBuilder
public io.grpc.netty.NettyChannelBuilder getChannelBuilder()- Returns:
- The channel builder.
-