Package net.xeoh.plugins.remotediscovery.impl.common.discoverymanager

Examples of net.xeoh.plugins.remotediscovery.impl.common.discoverymanager.DiscoveryManager.ping()


             * but, there is no TimeoutException....
             *
             * @sa DiscoveredPluginTest.testMultiplePlugins()
             */
            @SuppressWarnings("unused")
            int pingRes = newClient.ping(123321);

            // Execute collection asynchronously (TODO: cache pool usage could be
            // improved)
            final ExecutorService cachePool = Executors.newCachedThreadPool();
            final ExecutorCompletionService<String> ecs = new ExecutorCompletionService(cachePool);
View Full Code Here


        final Future<String> future = ecs.submit(new Callable<String>() {

            public String call() throws Exception {
                return AccessController.doPrivileged(new PrivilegedAction<String>() {
                    public String run() {
                        return newClient.ping(667) == 667 ? "OK" : null;
                    }
                });
            }
        });
View Full Code Here

                    public Object run() {
                        try {
                            final long start = System.nanoTime();

                            // Perform the ping
                            mgr.ping(new Random().nextInt());

                            // Obtain the time
                            final long stop = System.nanoTime();
                            final long time = (stop - start) / 1000;
View Full Code Here

        final Future<String> future = ecs.submit(new Callable<String>() {

            public String call() throws Exception {
                return AccessController.doPrivileged(new PrivilegedAction<String>() {
                    public String run() {
                        return newClient.ping(667) == 667 ? "OK" : null;
                    }
                });
            }
        });
View Full Code Here

                    public Object run() {
                        try {
                            final long start = System.nanoTime();

                            // Perform the ping
                            mgr.ping(new Random().nextInt());

                            // Obtain the time
                            final long stop = System.nanoTime();
                            final long time = (stop - start) / 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.