Package org.eclipse.jetty.client

Examples of org.eclipse.jetty.client.Address


        super(targetId);
       
        HttpURI uri = new HttpURI(gatewayURI);
       
        this.httpClient = httpClient;
        this.gatewayAddress = new Address(uri.getHost(),uri.getPort());
        this.gatewayPath = uri.getPath();
    }
View Full Code Here


    protected RHTTPClient createClient(int port, String targetId) throws Exception
    {
        ((StdErrLog)Log.getLog()).setSource(true);
        httpClient = new HttpClient();
        httpClient.start();
        return new JettyClient(httpClient, new Address("localhost", port), "", targetId);
    }
View Full Code Here

                value = "" + clients;
            clients = Integer.parseInt(value);

            System.err.println("Waiting for clients to be ready...");

            Address gatewayAddress = new Address(host, port);
            String gatewayURI = context + gatewayPath;

            // Create or remove the necessary clients
            int currentClients = this.clients.size();
            if (currentClients < clients)
View Full Code Here

        Connector connector = new SelectChannelConnector();
        server.addConnector(connector);
        server.setTargetIdRetriever(new EchoTargetIdRetriever());
        server.start();
        server.dumpStdErr();
        address = new Address("localhost", connector.getLocalPort());
        uri = server.getContext().getContextPath()+GatewayServer.DFT_EXT_PATH;

        httpClient = new HttpClient();
        httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
        httpClient.start();

        client = new JettyClient(httpClient, new Address("localhost", connector.getLocalPort()), server.getContext().getContextPath()+GatewayServer.DFT_CONNECT_PATH, "echo");
        client.addListener(new EchoListener(client));
        client.connect();
    }
View Full Code Here

        Connector connector = new SelectChannelConnector();
        server.addConnector(connector);
        server.start();
        try
        {
            Address address = new Address("localhost", connector.getLocalPort());

            HttpClient httpClient = new HttpClient();
            httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
            httpClient.start();
            try
View Full Code Here

            && ObjectHelper.isNotEmpty(context.getProperty("http.proxyHost"))
            && ObjectHelper.isNotEmpty(context.getProperty("http.proxyPort"))) {
            String host = context.getProperty("http.proxyHost");
            int port = Integer.parseInt(context.getProperty("http.proxyPort"));
            LOG.debug("CamelContext properties http.proxyHost and http.proxyPort detected. Using http proxy host: {} port: {}", host, port);
            httpClient.setProxy(new Address(host, port));
        }

        if (ObjectHelper.isNotEmpty(endpoint.getProxyHost()) && endpoint.getProxyPort() > 0) {
            String host = endpoint.getProxyHost();
            int port = endpoint.getProxyPort();
            LOG.debug("proxyHost and proxyPort options detected. Using http proxy host: {} port: {}", host, port);
            httpClient.setProxy(new Address(host, port));
        }
       
        // must have both min and max
        if (minThreads != null || maxThreads != null) {
View Full Code Here

            && ObjectHelper.isNotEmpty(context.getProperty("http.proxyHost"))
            && ObjectHelper.isNotEmpty(context.getProperty("http.proxyPort"))) {
            String host = context.getProperty("http.proxyHost");
            int port = Integer.parseInt(context.getProperty("http.proxyPort"));
            LOG.debug("CamelContext properties http.proxyHost and http.proxyPort detected. Using http proxy host: {} port: {}", host, port);
            httpClient.setProxy(new Address(host, port));
        }

        if (ObjectHelper.isNotEmpty(endpoint.getProxyHost()) && endpoint.getProxyPort() > 0) {
            String host = endpoint.getProxyHost();
            int port = endpoint.getProxyPort();
            LOG.debug("proxyHost and proxyPort options detected. Using http proxy host: {} port: {}", host, port);
            httpClient.setProxy(new Address(host, port));
        }
       
        // must have both min and max
        if (minThreads != null || maxThreads != null) {
View Full Code Here

            && ObjectHelper.isNotEmpty(context.getProperty("http.proxyHost"))
            && ObjectHelper.isNotEmpty(context.getProperty("http.proxyPort"))) {
            String host = context.getProperty("http.proxyHost");
            int port = Integer.parseInt(context.getProperty("http.proxyPort"));
            LOG.debug("CamelContext properties http.proxyHost and http.proxyPort detected. Using http proxy host: {} port: {}", host, port);
            httpClient.setProxy(new Address(host, port));
        }

        if (ObjectHelper.isNotEmpty(endpoint.getProxyHost()) && endpoint.getProxyPort() > 0) {
            String host = endpoint.getProxyHost();
            int port = endpoint.getProxyPort();
            LOG.debug("proxyHost and proxyPort options detected. Using http proxy host: {} port: {}", host, port);
            httpClient.setProxy(new Address(host, port));
        }
       
        // must have both min and max
        if (minThreads != null || maxThreads != null) {
View Full Code Here

            String host = System.getProperty("http.proxyHost");
            int port = Integer.parseInt(System.getProperty("http.proxyPort"));
            if (LOG.isDebugEnabled()) {
                LOG.debug("Java System Property http.proxyHost and http.proxyPort detected. Using http proxy host: {} port: {}", host, port);
            }
            httpClient.setProxy(new Address(host, port));
        }

        // use QueueThreadPool as the default bounded is deprecated (see SMXCOMP-157)
        if (getHttpClientThreadPool() == null) {
            QueuedThreadPool qtp = new QueuedThreadPool();
View Full Code Here

            String host = System.getProperty("http.proxyHost");
            int port = Integer.parseInt(System.getProperty("http.proxyPort"));
            if (LOG.isDebugEnabled()) {
                LOG.debug("Java System Property http.proxyHost and http.proxyPort detected. Using http proxy host: {} port: {}", host, port);
            }
            httpClient.setProxy(new Address(host, port));
        }

        // use QueueThreadPool as the default bounded is deprecated (see SMXCOMP-157)
        if (getHttpClientThreadPool() == null) {
            QueuedThreadPool qtp = new QueuedThreadPool();
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.client.Address

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.