Package com.sun.jersey.api.client.config

Examples of com.sun.jersey.api.client.config.ClientConfig


  protected WebResource getStorageResource() {
    return getStorageResource("rest");
  }

  protected WebResource getStorageResource(String subcontext) {
    ClientConfig config = new DefaultClientConfig();
    Client client = Client.create(config);
    int port = 8080;
    if (System.getProperty("container.port") != null) {
      port = Integer.parseInt(System.getProperty("container.port"));
    }
View Full Code Here


        return c;
    }

    private DockerClient(Config config) {
    restEndpointUrl = config.url + "/v" + config.version;
    ClientConfig clientConfig = new DefaultClientConfig();
    //clientConfig.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE);

    SchemeRegistry schemeRegistry = new SchemeRegistry();
    schemeRegistry.register(new Scheme("http", config.url.getPort(), PlainSocketFactory.getSocketFactory()));
    schemeRegistry.register(new Scheme("https", 443, SSLSocketFactory.getSocketFactory()));
View Full Code Here

  protected WebResource getStorageResource() {
    return getStorageResource("rest");
  }

  protected WebResource getStorageResource(String subcontext) {
    ClientConfig config = new DefaultClientConfig();
    Client client = Client.create(config);
    int port = 8080;
    if (System.getProperty("container.port") != null) {
      port = Integer.parseInt(System.getProperty("container.port"));
    }
View Full Code Here

  protected WebResource getStorageResource() {
    return getStorageResource("rest");
  }

  protected WebResource getStorageResource(String subcontext) {
    ClientConfig config = new DefaultClientConfig();
    Client client = Client.create(config);
    int port = 8080;
    if (System.getProperty("container.port") != null) {
      port = Integer.parseInt(System.getProperty("container.port"));
    }
View Full Code Here

        logger.debug("Creating Base URI");
        return UriBuilder.fromUri(baseURI).build();
    }

    private WebResource getDescriptorRegistryBaseResource() {
        ClientConfig config = new DefaultClientConfig();
        config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING,
                Boolean.TRUE);
        Client client = Client.create(config);
        WebResource baseWebResource = client.resource(getBaseURI());
        webResource = baseWebResource.path(
                ResourcePathConstants.DecResourcePathConstants.DESC_RESOURCE_PATH);
View Full Code Here

        logger.debug("Creating Base URI");
        return UriBuilder.fromUri(baseURI).build();
    }

    private com.sun.jersey.api.client.WebResource getUserWFRegistryBaseResource() {
        ClientConfig config = new DefaultClientConfig();
        config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING,
                Boolean.TRUE);
        Client client = Client.create(config);
        WebResource baseWebResource = client.resource(getBaseURI());
        webResource = baseWebResource.path(
                ResourcePathConstants.UserWFConstants.REGISTRY_API_USERWFREGISTRY);
View Full Code Here

        logger.debug("Creating Base URI");
        return UriBuilder.fromUri(baseURI).build();
    }

    private WebResource getProvenanceRegistryBaseResource() {
        ClientConfig config = new DefaultClientConfig();
        config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING,
                Boolean.TRUE);
        Client client = Client.create(config);
        WebResource baseWebResource = client.resource(getBaseURI());
        webResource = baseWebResource.path(
                ResourcePathConstants.ProvenanceResourcePathConstants.REGISTRY_API_PROVENANCEREGISTRY);
View Full Code Here

        logger.debug("Creating Base URI");
        return UriBuilder.fromUri(baseURI).build();
    }

    private WebResource getCredentialStoreRegistryBaseResource() {
        ClientConfig config = new DefaultClientConfig();
        config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING,
                Boolean.TRUE);
        Client client = Client.create(config);
        WebResource baseWebResource = client.resource(getBaseURI());
        webResource = baseWebResource.path(
                ResourcePathConstants.CredentialResourceConstants.REGISTRY_API_CREDENTIALREGISTRY);
View Full Code Here

     * @param proxyPort the port to use for the proxy host.  If {@code null}, this will use the default HTTP port.
     *
     * @return the Client that was created.
     */
    private static Client createClient(@Nullable final String proxyHost, @Nullable final Integer proxyPort) {
        final ClientConfig clientConfig = new DefaultClientConfig();
        clientConfig.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE);
        clientConfig.getClasses().add(JacksonObjectMapperProvider.class);

        if (StringUtils.isNotEmpty(proxyHost)) {
            Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, proxyPort == null ? 443 : proxyPort));
            return new Client(new URLConnectionClientHandler(new ProxyHandler(proxy)), clientConfig);
        }
View Full Code Here

        return c;
    }

    private DockerClient(Config config) {
    restEndpointUrl = config.url + "/v" + config.version;
    ClientConfig clientConfig = new DefaultClientConfig();
    //clientConfig.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE);

    SchemeRegistry schemeRegistry = new SchemeRegistry();
    schemeRegistry.register(new Scheme("http", config.url.getPort(), PlainSocketFactory.getSocketFactory()));
    schemeRegistry.register(new Scheme("https", 443, SSLSocketFactory.getSocketFactory()));
View Full Code Here

TOP

Related Classes of com.sun.jersey.api.client.config.ClientConfig

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.