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

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


  protected Client client = null;
    protected boolean logPassword;
    private JerseyLoggingFilter logger = new JerseyLoggingFilter(Logger.getLogger("os"));

  public JerseyConnector() {
    ClientConfig clientConfig = new DefaultClientConfig();
    clientConfig.getClasses().add(JacksonJaxbJsonProvider.class);
    clientConfig.getClasses().add(OpenStackObjectMapper.class);
    client = Client.create(clientConfig);
  }
View Full Code Here


  /**
   * @param env
   */
  public ClientController(Environment env) {
    ClientConfig config = new DefaultClientConfig();
    config.getClasses().add(JacksonJsonProvider.class);
    this.client = Client.create(config);
    Assert.notNull(env);
    this.env = env;
  }
View Full Code Here

  private WebResource webResource;

  @Before
  public void client() {
    ClientConfig config = new DefaultClientConfig();
    // Default jaxb provider cannot properly deserialize lists.
    config.getClasses().add(JacksonJsonProvider.class);

    webResource = Client.create(config).resource(baseUrl()).path("admin").path("resourceServer");
  }
View Full Code Here

  private List<String> resourceServerScopes = Arrays.asList("read", "write");

  @Before
  public void prepareRestClientAndCreateResourceServer() {
    ClientConfig config = new DefaultClientConfig();
    config.getClasses().add(JacksonJsonProvider.class);
    webResource = com.sun.jersey.api.client.Client.create(config)
        .resource(baseUrl())
        .path("admin")
        .path("resourceServer");
View Full Code Here

  /**
   * @return Client
   */
  protected Client createClient() {
    ClientConfig cc = new DefaultClientConfig();
    cc.getClasses().add(ObjectMapperProvider.class);
    return Client.create(cc);
  }
View Full Code Here

        }
    }

    private Client getClient(String host) {
        if (!hostMap.containsKey(host)) {
            ClientConfig clientConfig = new DefaultClientConfig();
            clientConfig.getClasses().add(MultiPartWriter.class);
            Client client = Client.create(clientConfig);
            if (isDebug) {
                client.addFilter(new LoggingFilter());
            }
            hostMap.put(host, client);
View Full Code Here

        "org.apache.hadoop.yarn.server.applicationhistoryservice.webapp")
        .contextListenerClass(GuiceServletConfig.class)
        .filterClass(com.google.inject.servlet.GuiceFilter.class)
        .contextPath("jersey-guice-filter")
        .servletPath("/")
        .clientConfig(new DefaultClientConfig(YarnJacksonJaxbJsonProvider.class))
        .build());
  }
View Full Code Here

    }

    @Provides
    public ClientConfig provideClientConfig() {
        if (clientConfig == null) {
            clientConfig = new DefaultClientConfig();
            clientConfig.getClasses().add(JSONProvider.class);
        }
        return clientConfig;
    }
View Full Code Here

        initParams.put("com.sun.jersey.config.property.packages", "org.socialmusicdiscovery.server.api;org.socialmusicdiscovery.server.business.logic.jersey");

        URI uri = UriBuilder.fromUri(HOST + "/").port(PORT).build();
        threadSelector = GrizzlyWebContainerFactory.create(uri, initParams);

        config = new DefaultClientConfig();
        config.getClasses().add(JSONProvider.class);
    }
View Full Code Here

        initParams.put("com.sun.jersey.config.property.packages", "org.socialmusicdiscovery.server.api;org.socialmusicdiscovery.server.business.logic.jersey");

        URI uri = UriBuilder.fromUri(HOST+"/").port(PORT).build();
        threadSelector = GrizzlyWebContainerFactory.create(uri, initParams);

        config = new DefaultClientConfig();
        config.getClasses().add(JSONProvider.class);
    }
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.