Java Code Examples for com.netflix.client.config.ClientConfigFactory#DEFAULT
The following examples show how to use
com.netflix.client.config.ClientConfigFactory#DEFAULT .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClientPropertiesTest.java From ribbon with Apache License 2.0 | 6 votes |
@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()); }
Example 2
Source File: ClientPropertiesTest.java From ribbon with Apache License 2.0 | 5 votes |
@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()); }
Example 3
Source File: SecuredRibbonResourceFactory.java From thorntail with Apache License 2.0 | 4 votes |
public SecuredRibbonResourceFactory(final int maxChunkSize) { this(ClientConfigFactory.DEFAULT, new SecuredTransportFactory(maxChunkSize), AnnotationProcessorsProvider.DEFAULT); }
Example 4
Source File: SecuredTransportFactory.java From thorntail with Apache License 2.0 | 4 votes |
protected SecuredTransportFactory(final int maxChunkSize) { super(ClientConfigFactory.DEFAULT); this.maxChunkSize = maxChunkSize; }
Example 5
Source File: SecuredRibbonResourceFactory.java From ARCHIVE-wildfly-swarm with Apache License 2.0 | 4 votes |
public SecuredRibbonResourceFactory(final int maxChunkSize) { this(ClientConfigFactory.DEFAULT, new SecuredTransportFactory(maxChunkSize), AnnotationProcessorsProvider.DEFAULT); }
Example 6
Source File: SecuredTransportFactory.java From ARCHIVE-wildfly-swarm with Apache License 2.0 | 4 votes |
protected SecuredTransportFactory(final int maxChunkSize) { super(ClientConfigFactory.DEFAULT); this.maxChunkSize = maxChunkSize; }
Example 7
Source File: ProxyHttpResourceGroupFactory.java From ribbon with Apache License 2.0 | 4 votes |
ProxyHttpResourceGroupFactory(ClassTemplate<T> classTemplate) { this(classTemplate, new DefaultResourceFactory(ClientConfigFactory.DEFAULT, RibbonTransportFactory.DEFAULT, AnnotationProcessorsProvider.DEFAULT), AnnotationProcessorsProvider.DEFAULT); }
Example 8
Source File: HttpResourceGroup.java From ribbon with Apache License 2.0 | 4 votes |
protected HttpResourceGroup(String groupName) { super(groupName, ClientOptions.create(), ClientConfigFactory.DEFAULT, RibbonTransportFactory.DEFAULT); client = transportFactory.newHttpClient(getClientConfig()); headers = HttpHeaders.EMPTY_HEADERS; }
Example 9
Source File: ResourceGroup.java From ribbon with Apache License 2.0 | 4 votes |
protected ResourceGroup(String name) { this(name, ClientOptions.create(), ClientConfigFactory.DEFAULT, RibbonTransportFactory.DEFAULT); }