1 31 package org.objectweb.proactive.ic2d.util; 32 33 import org.objectweb.proactive.core.node.Node; 36 40 public class JiniNodeFinder implements AllNodeFinder { 41 42 43 44 45 49 50 public JiniNodeFinder() { 51 } 52 53 54 58 62 public Node[] findNodes() { 63 return findNodes(null); 64 } 65 66 67 71 public Node[] findNodes(String host) { 72 JiniNodeListener nodelist= new JiniNodeListener(host); 74 try { 76 Thread.sleep(10000L); 77 } catch(java.lang.InterruptedException e) { 78 } 80 java.util.ArrayList nodes = nodelist.getNodes(); 81 Node[] nodeArray = new Node[nodes.size()]; 83 if (nodes.size() > 0) { 84 for (int i=0; i<nodes.size();i++){ 86 Node node = (Node) nodes.get(i); 87 nodeArray[i] = node; 88 } 89 } 90 return nodeArray; 91 } 92 93 94 } 95 96 97 | Popular Tags |