Examples of ApacheConnectorProvider


Examples of org.glassfish.jersey.apache.connector.ApacheConnectorProvider

    }

    private Client createHttpClient() {
        ClientConfig clientConfig = new ClientConfig()
                .register(new JacksonFeature())
                .connectorProvider(new ApacheConnectorProvider());
        if (Boolean.parseBoolean(System.getProperty("proxySet"))) {
            clientConfig.property(ClientProperties.PROXY_URI, "http://" + System.getProperty("http.proxyHost") + ":" + System.getProperty("http.proxyPort"));
        }
        return ClientBuilder.newClient(clientConfig);
    }
View Full Code Here

Examples of org.glassfish.jersey.apache.connector.ApacheConnectorProvider

        clientConfig.register(makeGZipFeature());
        clientConfig.property(ClientProperties.ASYNC_THREADPOOL_SIZE, maxConnections);
        clientConfig.property(ClientProperties.CONNECT_TIMEOUT, castRequestTimeout);
        clientConfig.property(ClientProperties.READ_TIMEOUT, castRequestTimeout);
        clientConfig.property(ApacheClientProperties.CONNECTION_MANAGER, makeConnectionManager(maxConnections));
        clientConfig.connectorProvider(new ApacheConnectorProvider());
        return ClientBuilder.newClient(clientConfig);
    }
View Full Code Here

Examples of org.glassfish.jersey.apache.connector.ApacheConnectorProvider

        return new ResourceConfig(ProducesFormDataUsingMultiPart.class);
    }

    @Override
    protected void configureClient(ClientConfig config) {
        config.connectorProvider(new ApacheConnectorProvider());
        config.register(MultiPartFeature.class);
    }
View Full Code Here

Examples of org.glassfish.jersey.apache.connector.ApacheConnectorProvider

                .keyStoreBytes(ByteStreams.toByteArray(keyStore))
                .keyPassword("asdfgh");

        ClientConfig cc = new ClientConfig();
        cc.property(ApacheClientProperties.SSL_CONFIG, sslConfig);
        cc.connectorProvider(new ApacheConnectorProvider());

        Client client = ClientBuilder.newClient(cc);
        // client basic auth demonstration
        client.register(HttpAuthenticationFeature.basic("user", "password"));
View Full Code Here

Examples of org.glassfish.jersey.apache.connector.ApacheConnectorProvider

                .keyPassword("asdfgh");


        ClientConfig cc = new ClientConfig();
        cc.property(ApacheClientProperties.SSL_CONFIG, sslConfig);
        cc.connectorProvider(new ApacheConnectorProvider());

        Client client = ClientBuilder.newClient(cc);

        System.out.println("Client: GET " + Server.BASE_URI);
View Full Code Here

Examples of org.glassfish.jersey.apache.connector.ApacheConnectorProvider

                .trustStoreBytes(ByteStreams.toByteArray(trustStore))
                .trustStorePassword("asdfgh");

        ClientConfig cc = new ClientConfig();
        cc.property(ApacheClientProperties.SSL_CONFIG, sslConfig);
        cc.connectorProvider(new ApacheConnectorProvider());

        Client client = ClientBuilder.newClient(cc);

        System.out.println("Client: GET " + Server.BASE_URI);
View Full Code Here

Examples of org.glassfish.jersey.apache.connector.ApacheConnectorProvider

        cm.setDefaultMaxPerRoute(MAX_LISTENERS * MAX_ITEMS);

        config.register(SseFeature.class)
                .property(ApacheClientProperties.CONNECTION_MANAGER, cm)
                .property(ClientProperties.READ_TIMEOUT, 2000)
                .connectorProvider(new ApacheConnectorProvider());
    }
View Full Code Here

Examples of org.glassfish.jersey.apache.connector.ApacheConnectorProvider

        testWithChunkEncodingPerRequest(getHttpUrlConnectorConfig());
        testDefaultOption(getHttpUrlConnectorConfig(), RequestEntityProcessing.BUFFERED);
    }

    private ClientConfig getApacheConnectorConfig() {
        return new ClientConfig().connectorProvider(new ApacheConnectorProvider());
    }
View Full Code Here

Examples of org.glassfish.jersey.apache.connector.ApacheConnectorProvider

        return new ExternalTestContainerFactory();
    }

    @Override
    protected void configureClient(ClientConfig config) {
        config.connectorProvider(new ApacheConnectorProvider());
    }
View Full Code Here

Examples of org.glassfish.jersey.apache.connector.ApacheConnectorProvider

        }

        @Override
        protected void configureClient(ClientConfig config) {
            config.connectorProvider(new ApacheConnectorProvider());
        }
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.