本文整理汇总了Java中com.netflix.client.config.ClientConfigFactory.DEFAULT属性的典型用法代码示例。如果您正苦于以下问题:Java ClientConfigFactory.DEFAULT属性的具体用法?Java ClientConfigFactory.DEFAULT怎么用?Java ClientConfigFactory.DEFAULT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.netflix.client.config.ClientConfigFactory
的用法示例。
在下文中一共展示了ClientConfigFactory.DEFAULT属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testAnnotation
@Test
public void testAnnotation() {
MyTransportFactory transportFactory = new MyTransportFactory(ClientConfigFactory.DEFAULT);
RibbonResourceFactory resourceFactory = new DefaultResourceFactory(ClientConfigFactory.DEFAULT, transportFactory);
RibbonDynamicProxy.newInstance(SampleMovieService.class, resourceFactory, ClientConfigFactory.DEFAULT, transportFactory);
IClientConfig clientConfig = transportFactory.getClientConfig();
assertEquals(1000, clientConfig.get(Keys.ConnectTimeout).longValue());
assertEquals(2000, clientConfig.get(Keys.ReadTimeout).longValue());
Configuration config = ConfigurationManager.getConfigInstance();
assertEquals("2000", config.getProperty("SampleMovieService.ribbon.ReadTimeout"));
assertEquals("1000", config.getProperty("SampleMovieService.ribbon.ConnectTimeout"));
config.setProperty("SampleMovieService.ribbon.ReadTimeout", "5000");
assertEquals(5000, clientConfig.get(Keys.ReadTimeout).longValue());
}
示例2: testNoExportToArchaius
@Test
public void testNoExportToArchaius() {
MyTransportFactory transportFactory = new MyTransportFactory(ClientConfigFactory.DEFAULT);
RibbonResourceFactory resourceFactory = new DefaultResourceFactory(ClientConfigFactory.DEFAULT, transportFactory);
RibbonDynamicProxy.newInstance(MovieService.class, resourceFactory, ClientConfigFactory.DEFAULT, transportFactory);
IClientConfig clientConfig = transportFactory.getClientConfig();
assertEquals(1000, clientConfig.get(Keys.ConnectTimeout).longValue());
assertEquals(3000, clientConfig.get(Keys.ReadTimeout).longValue());
assertEquals(0, clientConfig.get(Keys.MaxAutoRetriesNextServer).longValue());
Configuration config = ConfigurationManager.getConfigInstance();
assertNull(config.getProperty("MovieService.ribbon.ReadTimeout"));
config.setProperty("MovieService.ribbon.ReadTimeout", "5000");
assertEquals(5000, clientConfig.get(Keys.ReadTimeout).longValue());
}
示例3: SecuredRibbonResourceFactory
public SecuredRibbonResourceFactory(final int maxChunkSize) {
this(ClientConfigFactory.DEFAULT,
new SecuredTransportFactory(maxChunkSize),
AnnotationProcessorsProvider.DEFAULT);
}
示例4: SecuredTransportFactory
protected SecuredTransportFactory(final int maxChunkSize) {
super(ClientConfigFactory.DEFAULT);
this.maxChunkSize = maxChunkSize;
}
示例5: SecuredRibbonResourceFactory
public SecuredRibbonResourceFactory(final int maxChunkSize) {
this(ClientConfigFactory.DEFAULT,
new SecuredTransportFactory(maxChunkSize),
AnnotationProcessorsProvider.DEFAULT);
}
开发者ID:wildfly-swarm-archive,项目名称:ARCHIVE-wildfly-swarm,代码行数:5,代码来源:SecuredRibbonResourceFactory.java
示例6: ProxyHttpResourceGroupFactory
ProxyHttpResourceGroupFactory(ClassTemplate<T> classTemplate) {
this(classTemplate, new DefaultResourceFactory(ClientConfigFactory.DEFAULT, RibbonTransportFactory.DEFAULT, AnnotationProcessorsProvider.DEFAULT),
AnnotationProcessorsProvider.DEFAULT);
}
示例7: HttpResourceGroup
protected HttpResourceGroup(String groupName) {
super(groupName, ClientOptions.create(), ClientConfigFactory.DEFAULT, RibbonTransportFactory.DEFAULT);
client = transportFactory.newHttpClient(getClientConfig());
headers = HttpHeaders.EMPTY_HEADERS;
}
示例8: ResourceGroup
protected ResourceGroup(String name) {
this(name, ClientOptions.create(), ClientConfigFactory.DEFAULT, RibbonTransportFactory.DEFAULT);
}