Package org.mortbay.jetty.client

Examples of org.mortbay.jetty.client.Address


    /* ------------------------------------------------------------ */
    public BayeuxClient(HttpClient client, String url, Timer timer)
    {
        HttpURI uri = new HttpURI(url);
        _httpClient = client;
        _cometdAddress = new Address(uri.getHost(),uri.getPort());
        _path=uri.getPath();

        _timer = timer;
        if (_timer == null)
            _timer = new Timer("DefaultBayeuxClientTimer",true);
View Full Code Here


        t = in.readLine().trim();
        if (t.length()==0)
            t="/cometd";
        String uri=t+"/cometd";

        address=new Address(host,port);

        int nclients=100;
        int size=50;
        int rooms=100;
        int rooms_per_client=1;
View Full Code Here

        pool.setMaxThreads(500);
        pool.setDaemon(true);
        _httpClient.setThreadPool(pool);
        _httpClient.start();

        Address address = new Address (host,port);
       
       
        _client = new BayeuxClient(_httpClient,address,uri,_timer)
        {
            public void metaConnect(boolean success,Message message)
View Full Code Here

        pool.setMinThreads(200);
        pool.setDaemon(true);
        _httpClient.setThreadPool(pool);
        _httpClient.start();

        Address address = new Address (host,port);
       
       
        _client = new BayeuxClient(_httpClient,address,uri,_timer)
        {
            public void metaConnect(boolean success,Message message)
View Full Code Here

       
       
        Log.info("{} {}", getClass().getSimpleName(), "http client started.");
        if(_bayeuxClient==null)
        {
            Address address = new Address(_host, _port);
            _bayeuxClient = new BayeuxClient(_httpClient, address, _uri);
            if(_extensions!=null)
            {
              for(Extension ext : _extensions)
                _bayeuxClient.addExtension(ext);
View Full Code Here

    /* ------------------------------------------------------------ */
    public BayeuxClient(HttpClient client, String url, Timer timer)
    {
        HttpURI uri = new HttpURI(url);
        _httpClient = client;
        _cometdAddress = new Address(uri.getHost(),uri.getPort());
        _path=uri.getPath();
        _timer = timer;
        _scheme = (HttpSchemes.HTTPS.equals(uri.getScheme()))?HttpSchemes.HTTPS_BUFFER:HttpSchemes.HTTP_BUFFER;
    }
View Full Code Here

        // at this point and we can't move super.doSetUp() above this
        SERVER_PORT = getPorts().get(0);
        HttpClient http = new HttpClient();
        http.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);

        client = new BayeuxClient(http, new Address("localhost", SERVER_PORT), "/ajax/cometd");
        http.start();
        //need to start the client before you can add subscriptions
        client.start();
    }
View Full Code Here

        SERVER_PORT = getPorts().get(0);
        httpClient = new HttpClient();
        httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
        httpClient.start();

        bayeuxClient = new BayeuxClient(httpClient, new Address("localhost", SERVER_PORT), "/ajax/cometd");
        // need to start the client before you can add subscriptions
        bayeuxClient.start();
       
        assertTrue("httpClient is not running", httpClient.isRunning());
        assertTrue("bayeuxClient is not running", bayeuxClient.isRunning());
View Full Code Here

    {
        SERVER_PORT = getPorts().get(0);
        HttpClient http = new HttpClient();
        http.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);

        client = new BayeuxClient(http, new Address("localhost", SERVER_PORT), "/ajax/cometd");
        http.start();
        //need to start the client before you can add subscriptions
        client.start();
    }
View Full Code Here

                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: "
                            + host + " port: " + 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.mortbay.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.