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

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


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

    private WebResource getConfigurationBaseResource() {
        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.
                ConfigResourcePathConstants.CONFIGURATION_REGISTRY_RESOURCE);
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

        "org.apache.hadoop.yarn.appmaster.web")
              .contextListenerClass(GuiceServletConfig.class)
              .filterClass(com.google.inject.servlet.GuiceFilter.class)
              .contextPath("slideram").servletPath("/")
              .clientConfig(
                  new DefaultClientConfig(SliderJacksonJaxbJsonProvider.class))
              .build());
  }
View Full Code Here

        .post(RegistrationResponse.class, createDummyJSONRegister());
    Assert.assertEquals(RegistrationStatus.OK, response.getResponseStatus());
  }

  protected Client createTestClient() {
    ClientConfig clientConfig = new DefaultClientConfig();
    clientConfig.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE);
    return Client.create(clientConfig);
  }
View Full Code Here

            return getComponentProvider(c);
        }
    }

    public void testInjected() throws IOException {
        ClientConfig cc = new DefaultClientConfig();
        cc.getClasses().add(MyProvider.class);
        MyIoCComponentProviderFactory pf = new MyIoCComponentProviderFactory();
        Client c = Client.create(cc, pf);
        assertEquals(MyProvider.class, pf.componentClass);
    }
View Full Code Here

            entityStream.write(t.getBytes());
        }
    }

    public void testNoInjected() throws IOException {
        ClientConfig cc = new DefaultClientConfig();
        cc.getClasses().add(MyProviderNoInject.class);
        MyIoCComponentProviderFactory pf = new MyIoCComponentProviderFactory();
        Client c = Client.create(cc, pf);
        assertEquals(MyProviderNoInject.class, pf.componentClass);
    }
View Full Code Here

    /**
     * Create a new client instance.
     *
     */
    public Client() {
        this(createDefaultClientHander(), new DefaultClientConfig(), null);
    }
View Full Code Here

     *
     * @param root the root client handler for dispatching a request and
     *        returning a response.
     */
    public Client(ClientHandler root) {
        this(root, new DefaultClientConfig(), null);
    }
View Full Code Here

   
    @Override
    protected void setUp() throws Exception {
        super.setUp();

        ClientConfig config = new DefaultClientConfig();
        config.getClasses().add(MultiPartBeanProvider.class);
        client = Client.create(config);
    }
View Full Code Here

   
    @Override
    protected void setUp() throws Exception {
        super.setUp();

        ClientConfig config = new DefaultClientConfig();
        config.getClasses().add(MultiPartBeanProvider.class);
        client = Client.create(config);
    }
View Full Code Here

TOP

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

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.