public static ServiceClient createServiceClient() { try { ServiceClient serviceClient = NettyHttpServiceClient.create( JaxRsServiceClient.class.getSimpleName(), Executors.newFixedThreadPool(DEFAULT_THREAD_COUNT), Executors.newScheduledThreadPool(DEFAULT_THREAD_COUNT)); serviceClient.start(); return serviceClient; } catch (Exception e) { throw new RuntimeException("Unable to create ServiceClient due to " + e.getMessage(), e); } }
serviceClient.start();
clientContext.init(kmf.getKeyManagers(), trustManagerFactory.getTrustManagers(), null); client.setSSLContext(clientContext); client.start();
clientContext.init(kmf.getKeyManagers(), trustManagerFactory.getTrustManagers(), null); client.setSSLContext(clientContext); client.start();
client.start();
@Test public void testConnectionLimit() throws Throwable { List<Service> services = this.host.doThroughputServiceStart(this.serviceCount, MinimalTestService.class, this.host.buildMinimalTestState(), null, null); String tag = "http1.1ConnectionLimitTag"; int limit = 8; ServiceClient serviceClient = createNettyServiceClient(); serviceClient.setConnectionLimitPerTag(tag, limit); serviceClient.start(); for (int i = 0; i < this.iterationCount; i++) { doConnectionLimit(services, serviceClient, tag, limit); } serviceClient.stop(); }
@Test public void testConnectionLimit() throws Throwable { List<Service> services = this.host.doThroughputServiceStart(this.serviceCount, MinimalTestService.class, this.host.buildMinimalTestState(), null, null); String tag = "http1.1ConnectionLimitTag"; int limit = 8; ServiceClient serviceClient = createNettyServiceClient(); serviceClient.setConnectionLimitPerTag(tag, limit); serviceClient.start(); for (int i = 0; i < this.iterationCount; i++) { doConnectionLimit(services, serviceClient, tag, limit); } serviceClient.stop(); }
this.client.start();
nonXenonLookingClient = NettyHttpServiceClient.create(UUID.randomUUID().toString(), Executors.newFixedThreadPool(1), Executors.newScheduledThreadPool(1)); nonXenonLookingClient.start(); s = System.nanoTime() / 1000;
nonXenonLookingClient = NettyHttpServiceClient.create(UUID.randomUUID().toString(), Executors.newFixedThreadPool(1), Executors.newScheduledThreadPool(1)); nonXenonLookingClient.start(); s = System.nanoTime() / 1000;