@Test public void testDefaultPortConfig() { GrpcChannelDescriptor chCfg = grpcConfig.channels().get(DEFAULT_PORT_CFG); assertThat(chCfg.host(), equalTo("non_default_host.com")); assertThat(chCfg.port(), equalTo(1408)); assertThat(chCfg.tlsDescriptor().isPresent(), is(false)); assertThat(chCfg.target().isPresent(), is(false)); assertThat(chCfg.loadBalancerPolicy().isPresent(), is(false)); assertThat(chCfg.nameResolverFactory().isPresent(), is(false)); }
Map<String, GrpcChannelDescriptor> channels() { return channelConfigs; }
GrpcChannelsProvider { Map<String, GrpcChannelDescriptor> channels() { return channelConfigs; } }
GrpcChannelsProvider { Map<String, GrpcChannelDescriptor> channels() { return channelConfigs; } private  GrpcChannelsProvider(Map<String, GrpcChannelDescriptor> channelDescriptors); }
GrpcChannelsProvider { Map<String, GrpcChannelDescriptor> channels() { return channelConfigs; } private  GrpcChannelsProvider(Map<String, GrpcChannelDescriptor> channelDescriptors); static GrpcChannelsProvider create(); static GrpcChannelsProvider create(Config config); static GrpcChannelsProvider.Builder builder(); static GrpcChannelsProvider.Builder builder(Config config); ManagedChannel channel(String name); }
GrpcChannelsProvider { Map<String, GrpcChannelDescriptor> channels() { return channelConfigs; } private  GrpcChannelsProvider(Map<String, GrpcChannelDescriptor> channelDescriptors); static GrpcChannelsProvider create(); static GrpcChannelsProvider create(Config config); static GrpcChannelsProvider.Builder builder(); static GrpcChannelsProvider.Builder builder(Config config); ManagedChannel channel(String name); static final String DEFAULT_CHANNEL_NAME; static final String DEFAULT_HOST; static final String CFG_KEY_CHANNELS; static final int DEFAULT_PORT; }