Package org.apache.commons.httpclient

Examples of org.apache.commons.httpclient.HttpHost


    public Object clone() {
        return new ProtocolAwareHostConfiguration(this);
    }

    public synchronized void setHost(String host, int port, String scheme) {
        setHost(new HttpHost(host, port, keepProtocol(host, port, scheme)));
    }
View Full Code Here


                                    endpoint.getSsl(),
                                    endpoint.getKeystoreManager());
                    protocol = new Protocol("https", sf, 443);
                }
            }
            HttpHost httphost = new HttpHost(uri.getHost(), uri.getPort(), protocol);
            host = new HostConfiguration();
            host.setHost(httphost);
        } else {
            host = new HostConfiguration();
            host.setHost(uri.getHost(), uri.getPort());
View Full Code Here

    @Override
    public synchronized void setHost(HttpHost host)
    {
        Protocol newProtocol = cloneProtocolKeepingSocketFactory(host.getProtocol());
       
        HttpHost hostCopy = new HttpHost(host.getHostName(), host.getPort(), newProtocol);
        super.setHost(hostCopy);
    }
View Full Code Here

    public void testSetHostViaHttpHost()
    {
        HostConfiguration hostConfig = createHostConfiguration();
       
        HttpHost host = new HttpHost("www.mulesoft.org", 8080);
        hostConfig.setHost(host);
       
        assertMockSocketFactory(hostConfig);
        assertEquals("www.mulesoft.org", hostConfig.getHost());
        assertEquals(8080, hostConfig.getPort());
View Full Code Here

        if (uri.getScheme().equals("https")) {
            ProtocolSocketFactory sf = new CommonsHttpSSLSocketFactory(
                            endpoint.getSsl(),
                            endpoint.getKeystoreManager());
            Protocol protocol = new Protocol("https", sf, 443);
            HttpHost host = new HttpHost(uri.getHost(), uri.getPort(), protocol);
            this.host = new HostConfiguration();
            this.host.setHost(host);
        } else {
            this.host = new HostConfiguration();
            this.host.setHost(uri.getHost(), uri.getPort());
View Full Code Here

        super.init();
        try {
            URI uri = new URI(url);
            ProtocolSocketFactory sf = new CommonsHttpSSLSocketFactory();
            Protocol protocol = new Protocol("https", sf, 443);
            HttpHost host = new HttpHost(uri.getHost(), uri.getPort(), protocol);
            hostConfiguration.setHost(host);
        } catch (Exception e) {
            throw new JBIException("Unable to initialize HttpsInvoker", e);
        }
    }
View Full Code Here

                                    endpoint.getSsl(),
                                    endpoint.getKeystoreManager());
                    protocol = new Protocol("https", sf, 443);
                }
            }
            HttpHost httphost = new HttpHost(uri.getHost(), uri.getPort(), protocol);
            host = new HostConfiguration();
            host.setHost(httphost);
        } else {
            host = new HostConfiguration();
            host.setHost(uri.getHost(), uri.getPort());
View Full Code Here

    protected final Protocol httpsProtocol;

    /** Get a host for the given parameters. This method need not be thread-safe. */
    public HttpHost getHost(HostConfiguration old, String scheme, String host, int port)
    {
        return new HttpHost(host, port, getProtocol(old, scheme, host, port));
    }
View Full Code Here

        return new HostConfigurationWithStickyProtocol(this);
    }

    public synchronized void setHost(String host, int port, String scheme)
    {
        setHost(new HttpHost(host, port, getNewProtocol(host, port, scheme)));
    }
View Full Code Here

  }

  @Override
  public synchronized List<Task> assignTasks(TaskTracker taskTracker)
      throws IOException {
    HttpHost tracker = new HttpHost(taskTracker.getStatus().getHost(),
        taskTracker.getStatus().getHttpPort());

    if (!mesosTrackers.containsKey(tracker)) {
      // TODO(bmahler): Consider allowing non-Mesos TaskTrackers.
      LOG.info("Unknown/exited TaskTracker: " + tracker + ". ");
View Full Code Here

TOP

Related Classes of org.apache.commons.httpclient.HttpHost

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.