Package org.glassfish.jersey.client

Examples of org.glassfish.jersey.client.ClientConfig$State


        Server.stopServer();
    }

    @Test
    public void testSSLWithBasicAndSSLAuthGrizzlyConnector() {
        final ClientConfig clientConfig = getGrizzlyConfig();
        _testSSLWithBasicAndSSLAuth(clientConfig);
    }
View Full Code Here


        final ClientConfig clientConfig = getGrizzlyConfig();
        _testSSLWithBasicAndSSLAuth(clientConfig);
    }

    private ClientConfig getGrizzlyConfig() {
        return new ClientConfig().connectorProvider(new GrizzlyConnectorProvider());
    }
View Full Code Here

        return new ClientConfig().connectorProvider(new GrizzlyConnectorProvider());
    }

    @Test
    public void testSSLWithBasicAndSSLAuthHttpUrlConnector() {
        final ClientConfig clientConfig = getHttpUrlConnectorConfig();
        _testSSLWithBasicAndSSLAuth(clientConfig);
    }
View Full Code Here

        final ClientConfig clientConfig = getHttpUrlConnectorConfig();
        _testSSLWithBasicAndSSLAuth(clientConfig);
    }

    private ClientConfig getHttpUrlConnectorConfig() {
        return new ClientConfig().connectorProvider(new HttpUrlConnectorProvider());
    }
View Full Code Here

    @Test
    public void testCachingConnector() {
        final ReferenceCountingNullConnector connectorProvider = new ReferenceCountingNullConnector();
        final CachingConnectorProvider cachingConnectorProvider = new CachingConnectorProvider(connectorProvider);
        final ClientConfig configuration = new ClientConfig().connectorProvider(cachingConnectorProvider).getConfiguration();

        Client client1 = ClientBuilder.newClient(configuration);
        try {
            client1.target(UriBuilder.fromUri("/").build()).request().get();
        } catch (ProcessingException ce) {
View Full Code Here

    protected Application configure() {
        return new ResourceConfig(Resource.class, LoggingFilter.class);
    }

    private WebTarget getTarget(boolean followRedirect) {
        Client client = ClientBuilder.newClient(new ClientConfig().property(ClientProperties.FOLLOW_REDIRECTS,
                followRedirect));
        return client.target(getBaseUri()).path("resource/redirect");
    }
View Full Code Here

    }

    @Test
    public void testClientThreadPool() throws Exception {
        final AsyncInvoker invoker = ClientBuilder
                .newClient(new ClientConfig().property(ClientProperties.ASYNC_THREADPOOL_SIZE, 9))
                .target(getBaseUri())
                .path("threadpool")
                .request()
                .async();
View Full Code Here

        eventInput.close();
    }

    @Test
    public void testGrizzlyConnectorWithEventSource() throws InterruptedException {
        ClientConfig clientConfig = new ClientConfig();
        clientConfig.property(ClientProperties.CONNECT_TIMEOUT, 15000);
        clientConfig.property(ClientProperties.READ_TIMEOUT, 0);
        clientConfig.property(ClientProperties.ASYNC_THREADPOOL_SIZE, 8);
        clientConfig.connectorProvider(new GrizzlyConnectorProvider());
        Client client = ClientBuilder.newBuilder().withConfig(clientConfig).build();

        final CountDownLatch latch = new CountDownLatch(1);
        final AtomicReference<String> eventData = new AtomicReference<String>();
        final AtomicInteger counter = new AtomicInteger(0);
View Full Code Here

            // OK
        }
    }

    private Client createGrizzlyClient() {
        return ClientBuilder.newClient(new ClientConfig().connectorProvider(new GrizzlyConnectorProvider()));
    }
View Full Code Here

                "subEntities.field1,defaultEntities.field,defaultEntities.property", PrimaryDetailedView.Factory.get(),
                new CustomAnnotationImpl());
    }

    private void testConfiguration(final String expected, final Annotation... annotations) {
        final ClientConfig config = new ClientConfig()
                .property(EntityFilteringFeature.ENTITY_FILTERING_SCOPE, annotations.length == 1 ? annotations[0] : annotations);
        configureClient(config);

        final String fields = ClientBuilder.newClient(config)
                .target(getBaseUri())
View Full Code Here

TOP

Related Classes of org.glassfish.jersey.client.ClientConfig$State

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.