Package org.glassfish.jersey.spi

Examples of org.glassfish.jersey.spi.RequestExecutorProvider


        return new FiberClient(ClientBuilder.newClient(addDefaultConfigurations(configuration)));
    }

    private static ClientConfig addDefaultConfigurations(Configuration configuration) {
        // currently there is no usage with the singleThreadPool variable due to jersey bug. See below.
        final RequestExecutorProvider singleThreadPool = new RequestExecutorProvider() {
            private ExecutorService tp = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setDaemon(true).setNameFormat("jersey-puniverse-single-worker-%d").build());

            @Override
            public ExecutorService getRequestingExecutor() {
                return tp;
View Full Code Here


     *
     * @param configuration data used to provide initial configuration for the new client instance.
     * @return a new, configured, client instance.
     */
    public static Client newClient(Configuration configuration) {
        final RequestExecutorProvider singleThreadPool = new RequestExecutorProvider() {
            private ExecutorService tp = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setDaemon(true).setNameFormat("jersey-puniverse-single-worker-%d").build());
            @Override
            public ExecutorService getRequestingExecutor() {
                return tp;
            }
View Full Code Here

    }

    @Override
    protected RequestExecutorProvider getDefaultProvider(final Object... initArgs) {

        return new RequestExecutorProvider() {

            @Override
            public ExecutorService getRequestingExecutor() {
                int poolSize = 0;
                if (initArgs != null && initArgs.length > 0 && initArgs[0] instanceof Integer) {
View Full Code Here

        super(locator);
    }

    @Override
    protected RequestExecutorProvider getDefaultProvider(Object... initArgs) {
        return new RequestExecutorProvider() {

            @Override
            public ExecutorService getRequestingExecutor() {
                return Executors.newCachedThreadPool(
                        new ThreadFactoryBuilder().setNameFormat("jersey-server-managed-async-executor-%d").build());
View Full Code Here

TOP

Related Classes of org.glassfish.jersey.spi.RequestExecutorProvider

Copyright © 2018 www.massapicom. 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.