Examples of NioClient


Examples of com.cloud.utils.nio.NioClient

    // for simulator use only
    public Agent(IAgentShell shell) {
        _shell = shell;
        _link = null;

        _connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this);

        Runtime.getRuntime().addShutdownHook(new ShutdownThread(this));

        _ugentTaskPool = new ThreadPoolExecutor(shell.getPingRetries(), 2 * shell.getPingRetries(), 10, TimeUnit.MINUTES,
                                                new SynchronousQueue<Runnable>(), new NamedThreadFactory("UgentTask")
View Full Code Here

Examples of com.cloud.utils.nio.NioClient

        if (!_resource.configure(getResourceName(), params)) {
            throw new ConfigurationException("Unable to configure " + _resource.getName());
        }

        _connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this);

        // ((NioClient)_connection).setBindAddress(_shell.getPrivateIp());

        s_logger.debug("Adding shutdown hook");
        Runtime.getRuntime().addShutdownHook(new ShutdownThread(this));
View Full Code Here

Examples of com.cloud.utils.nio.NioClient

        }
  
        _connection.start();
       while (!_connection.isStartup()) {
           _shell.getBackoffAlgorithm().waitBeforeRetry();
           _connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this);
           _connection.start();
       }
    }
View Full Code Here

Examples of com.cloud.utils.nio.NioClient

        try {
            _connection.cleanUp();
        } catch (IOException e) {
            s_logger.warn("Fail to clean up old connection. " + e);
        }
        _connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this);
        do {
            s_logger.info("Reconnecting...");
            _connection.start();
            _shell.getBackoffAlgorithm().waitBeforeRetry();
        } while (!_connection.isStartup());
View Full Code Here

Examples of com.cloud.utils.nio.NioClient

        _completedCount = 0;
       
        _server = new NioServer("NioTestServer", 7777, 5, new NioTestServer());
        _server.start();
       
        _client = new NioClient("NioTestServer", "127.0.0.1", 7777, 5, new NioTestClient());
        _client.start();
       
        while (_clientLink == null) {
            try {
                s_logger.debug("Link is not up! Waiting ...");
View Full Code Here

Examples of com.cloud.utils.nio.NioClient

    // for simulator use only
    public Agent(IAgentShell shell) {
        _shell = shell;
        _link = null;

        _connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this);

        Runtime.getRuntime().addShutdownHook(new ShutdownThread(this));

        _ugentTaskPool =
            new ThreadPoolExecutor(shell.getPingRetries(), 2 * shell.getPingRetries(), 10, TimeUnit.MINUTES, new SynchronousQueue<Runnable>(), new NamedThreadFactory(
View Full Code Here

Examples of com.cloud.utils.nio.NioClient

        if (!_resource.configure(getResourceName(), params)) {
            throw new ConfigurationException("Unable to configure " + _resource.getName());
        }

        _connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this);

        // ((NioClient)_connection).setBindAddress(_shell.getPrivateIp());

        s_logger.debug("Adding shutdown hook");
        Runtime.getRuntime().addShutdownHook(new ShutdownThread(this));
View Full Code Here

Examples of com.cloud.utils.nio.NioClient

        }

        _connection.start();
        while (!_connection.isStartup()) {
            _shell.getBackoffAlgorithm().waitBeforeRetry();
            _connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this);
            _connection.start();
        }
    }
View Full Code Here

Examples of com.cloud.utils.nio.NioClient

        try {
            _connection.cleanUp();
        } catch (IOException e) {
            s_logger.warn("Fail to clean up old connection. " + e);
        }
        _connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this);
        do {
            s_logger.info("Reconnecting...");
            _connection.start();
            _shell.getBackoffAlgorithm().waitBeforeRetry();
        } while (!_connection.isStartup());
View Full Code Here

Examples of com.cloud.utils.nio.NioClient

        _completedCount = 0;
       
        _server = new NioServer("NioTestServer", 7777, 5, new NioTestServer());
        _server.start();
       
        _client = new NioClient("NioTestServer", "127.0.0.1", 7777, 5, new NioTestClient());
        _client.start();
       
        while (_clientLink == null) {
            try {
                Thread.sleep(1000);
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.