Examples of ApacheHttpClient


Examples of com.sun.jersey.client.apache.ApacheHttpClient

  public IZencoderClient createClient(ZencoderAPIVersion apiVersion) {
    ZencoderClient zencoderClient = new ZencoderClient(API_KEY, apiVersion);
    HttpClient client = new HttpClient(new SimpleHttpConnectionManager());
    ApacheHttpClientHandler apacheHttpClientHandler = new ApacheHttpClientHandler(
        client, new DefaultApacheHttpClientConfig());
    ApacheHttpClient httpClient = new ApacheHttpClient(
        apacheHttpClientHandler);
    zencoderClient.setHttpClient(httpClient);

    return zencoderClient;
  }
View Full Code Here

Examples of com.sun.jersey.client.apache.ApacheHttpClient

  public JerseyJiraRestClient(final URI serverUri, final AuthenticationHandler authenticationHandler) {
        this.baseUri = UriBuilder.fromUri(serverUri).path("/rest/api/latest").build();
        DefaultApacheHttpClientConfig config = new DefaultApacheHttpClientConfig();
        authenticationHandler.configure(config);
        final ApacheHttpClient client = new ApacheHttpClient(createDefaultClientHander(config)) {
            @Override
            public WebResource resource(URI u) {
                final WebResource resource = super.resource(u);
                authenticationHandler.configure(resource, this);
                return resource;
View Full Code Here

Examples of com.sun.jersey.client.apache.ApacheHttpClient

      if (this.client == null) {
        DefaultApacheHttpClientConfig config = new DefaultApacheHttpClientConfig();
        config.getState().setCredentials(null, null, -1, httpBasicAuthUsername, httpBasicAuthPassword);
        config.getProperties().put(ApacheHttpClientConfig.PROPERTY_PREEMPTIVE_AUTHENTICATION, true);
        ApacheHttpClientHandler ahcHandler = new ApacheHttpClientHandler(new HttpClient(new MultiThreadedHttpConnectionManager()), config);
        ApacheHttpClient ahc = new ApacheHttpClient(ahcHandler);
        setClient(ahc);
        wr = ahc.resource(uri);
      }
      else {
        wr = this.client.resource(uri);
      }
    }
View Full Code Here

Examples of com.sun.jersey.client.apache.ApacheHttpClient

  public JerseyJiraRestClient(final URI serverUri, final AuthenticationHandler authenticationHandler) {
        this.baseUri = UriBuilder.fromUri(serverUri).path("/rest/api/latest").build();
        DefaultApacheHttpClientConfig config = new DefaultApacheHttpClientConfig();
        authenticationHandler.configure(config);
        final ApacheHttpClient client = new ApacheHttpClient(createDefaultClientHander(config)) {
            @Override
            public WebResource resource(URI u) {
                final WebResource resource = super.resource(u);
                authenticationHandler.configure(resource, this);
                return resource;
View Full Code Here

Examples of io.airlift.http.client.ApacheHttpClient

    @BeforeMethod
    public void setup()
            throws Exception
    {
        server = new TestingPrestoServer();
        client = new ApacheHttpClient();
    }
View Full Code Here

Examples of io.airlift.http.client.ApacheHttpClient

        lifeCycleManager = injector.getInstance(LifeCycleManager.class);

        server = injector.getInstance(TestingHttpServer.class);

        client = new ApacheHttpClient();
    }
View Full Code Here

Examples of io.airlift.http.client.ApacheHttpClient

    @BeforeMethod
    public void setup()
            throws Exception
    {
        server = new TestingPrestoServer();
        client = new ApacheHttpClient();
    }
View Full Code Here

Examples of io.airlift.http.client.ApacheHttpClient

    @BeforeMethod
    public void setup()
            throws Exception
    {
        server = new TestingPrestoServer();
        client = new ApacheHttpClient();
    }
View Full Code Here

Examples of io.airlift.http.client.ApacheHttpClient

    @BeforeMethod
    public void setup()
            throws Exception
    {
        server = new TestingPrestoServer();
        client = new ApacheHttpClient();
    }
View Full Code Here

Examples of io.airlift.http.client.ApacheHttpClient

    @BeforeMethod
    public void setup()
            throws Exception
    {
        server = new TestingPrestoServer();
        client = new ApacheHttpClient();
    }
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.