Package org.glassfish.jersey.client

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


    clientConfig.property(ClientProperties.FEATURE_AUTO_DISCOVERY_DISABLE,
        true);
    clientConfig.property(ClientProperties.FOLLOW_REDIRECTS, false);
    clientConfig.property(ClientProperties.JSON_PROCESSING_FEATURE_DISABLE,
        false);
    clientConfig.property(ClientProperties.METAINF_SERVICES_LOOKUP_DISABLE,
        true);
    clientConfig.property(ClientProperties.MOXY_JSON_FEATURE_DISABLE, true);
    clientConfig.property(ApacheClientProperties.CONNECTION_MANAGER,
        clientConnectionManager);
    clientConfig.property(ApacheClientProperties.DISABLE_COOKIES, true);
View Full Code Here


    clientConfig.property(ClientProperties.FOLLOW_REDIRECTS, false);
    clientConfig.property(ClientProperties.JSON_PROCESSING_FEATURE_DISABLE,
        false);
    clientConfig.property(ClientProperties.METAINF_SERVICES_LOOKUP_DISABLE,
        true);
    clientConfig.property(ClientProperties.MOXY_JSON_FEATURE_DISABLE, true);
    clientConfig.property(ApacheClientProperties.CONNECTION_MANAGER,
        clientConnectionManager);
    clientConfig.property(ApacheClientProperties.DISABLE_COOKIES, true);
    clientConfig.property(ApacheClientProperties.HTTP_PARAMS, httpParams);
    clientConfig.property(
View Full Code Here

    clientConfig.property(ClientProperties.JSON_PROCESSING_FEATURE_DISABLE,
        false);
    clientConfig.property(ClientProperties.METAINF_SERVICES_LOOKUP_DISABLE,
        true);
    clientConfig.property(ClientProperties.MOXY_JSON_FEATURE_DISABLE, true);
    clientConfig.property(ApacheClientProperties.CONNECTION_MANAGER,
        clientConnectionManager);
    clientConfig.property(ApacheClientProperties.DISABLE_COOKIES, true);
    clientConfig.property(ApacheClientProperties.HTTP_PARAMS, httpParams);
    clientConfig.property(
        ApacheClientProperties.PREEMPTIVE_BASIC_AUTHENTICATION, false);
View Full Code Here

    clientConfig.property(ClientProperties.METAINF_SERVICES_LOOKUP_DISABLE,
        true);
    clientConfig.property(ClientProperties.MOXY_JSON_FEATURE_DISABLE, true);
    clientConfig.property(ApacheClientProperties.CONNECTION_MANAGER,
        clientConnectionManager);
    clientConfig.property(ApacheClientProperties.DISABLE_COOKIES, true);
    clientConfig.property(ApacheClientProperties.HTTP_PARAMS, httpParams);
    clientConfig.property(
        ApacheClientProperties.PREEMPTIVE_BASIC_AUTHENTICATION, false);
    return clientConfig;
  }
View Full Code Here

        true);
    clientConfig.property(ClientProperties.MOXY_JSON_FEATURE_DISABLE, true);
    clientConfig.property(ApacheClientProperties.CONNECTION_MANAGER,
        clientConnectionManager);
    clientConfig.property(ApacheClientProperties.DISABLE_COOKIES, true);
    clientConfig.property(ApacheClientProperties.HTTP_PARAMS, httpParams);
    clientConfig.property(
        ApacheClientProperties.PREEMPTIVE_BASIC_AUTHENTICATION, false);
    return clientConfig;
  }
View Full Code Here

    clientConfig.property(ClientProperties.MOXY_JSON_FEATURE_DISABLE, true);
    clientConfig.property(ApacheClientProperties.CONNECTION_MANAGER,
        clientConnectionManager);
    clientConfig.property(ApacheClientProperties.DISABLE_COOKIES, true);
    clientConfig.property(ApacheClientProperties.HTTP_PARAMS, httpParams);
    clientConfig.property(
        ApacheClientProperties.PREEMPTIVE_BASIC_AUTHENTICATION, false);
    return clientConfig;
  }

  private PoolingClientConnectionManager createPoolingClientConnectionManager(
View Full Code Here

    }

    @Test
    public void testAuthGet() {
        ClientConfig config = new ClientConfig();
        config.property(JettyClientProperties.PREEMPTIVE_BASIC_AUTHENTICATION,
                new BasicAuthentication(getBaseUri(), "WallyWorld", "name", "password"));
        config.connectorProvider(new JettyConnectorProvider());
        Client client = ClientBuilder.newClient(config);

        Response response = client.target(getBaseUri()).path(PATH).request().get();
View Full Code Here

    }

    @Test
    public void testAuthPost() {
        ClientConfig config = new ClientConfig();
        config.property(JettyClientProperties.PREEMPTIVE_BASIC_AUTHENTICATION,
                new BasicAuthentication(getBaseUri(), "WallyWorld", "name", "password"));
        config.connectorProvider(new JettyConnectorProvider());
        Client client = ClientBuilder.newClient(config);

        Response response = client.target(getBaseUri()).path(PATH).request().post(Entity.text("POST"));
View Full Code Here

    }

    @Test
    public void testAuthDelete() {
        ClientConfig config = new ClientConfig();
        config.property(JettyClientProperties.PREEMPTIVE_BASIC_AUTHENTICATION,
                new BasicAuthentication(getBaseUri(), "WallyWorld", "name", "password"));
        config.connectorProvider(new JettyConnectorProvider());
        Client client = ClientBuilder.newClient(config);

        Response response = client.target(getBaseUri()).path(PATH).request().delete();
View Full Code Here

    protected Client createPoolingClient() {
        ClientConfig cc = new ClientConfig();
        PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager();
        connectionManager.setMaxTotal(100);
        connectionManager.setDefaultMaxPerRoute(100);
        cc.property(ApacheClientProperties.CONNECTION_MANAGER, connectionManager);
        cc.connectorProvider(new ApacheConnectorProvider());
        return ClientBuilder.newClient(cc);
    }

    private WebTarget getWebTarget(final Client client) {
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.