Package org.glassfish.jersey.client

Examples of org.glassfish.jersey.client.ClientConfig.loadFrom()


                // This is commented since, jersey has major problem (since ~2.5) - it blocks the calling thread !!!
                // When this bug will be fixed we should uncomment this line in order to enable a lot of concurrent open requsets               
                //                register(singleThreadPool, RequestExecutorProvider.class).
                property(ClientProperties.ASYNC_THREADPOOL_SIZE, 20);
        if (configuration != null)
            config.loadFrom(configuration);
        if (config.getConnectorProvider() == null)
            config.connectorProvider(new JettyConnectorProvider());
        return config;
    }
View Full Code Here


        };
        final ClientConfig config = new ClientConfig().
                register(singleThreadPool, RequestExecutorProvider.class).
                property(ClientProperties.ASYNC_THREADPOOL_SIZE, 20);
        if (configuration != null)
            config.loadFrom(configuration);
        if (config.getConnectorProvider() == null)
            config.connectorProvider(new JettyConnectorProvider());

        return new FiberClient(ClientBuilder.newClient(config));
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.