aboutsummaryrefslogtreecommitdiff
path: root/src/Ivy.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ivy.java')
-rwxr-xr-xsrc/Ivy.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/Ivy.java b/src/Ivy.java
index 5c11066..b3f8bfb 100755
--- a/src/Ivy.java
+++ b/src/Ivy.java
@@ -22,6 +22,9 @@ import java.util.*;
*</pre>
*
* CHANGELOG:
+ * 1.2.2:
+ * - added the String domains(String d) function, in order to display the
+ * domain list
* 1.2.1:
* - bus.start(null) now starts on DEFAULT_DOMAIN
* - added the getDomains in order to correctly display the domain list
@@ -332,7 +335,7 @@ public class Ivy implements Runnable {
public Vector getIvyClients() {
Vector v=new Vector();
for (Enumeration e=clients.elements();e.hasMoreElements();) {
- v.add(e.nextElement());
+ v.addElement(e.nextElement());
}
return v;
}
@@ -378,10 +381,10 @@ public class Ivy implements Runnable {
if (length!=0) while (true) {
index=s.indexOf(separator,last);
if (index==-1) {
- v.add(s.substring(last,length));
+ v.addElement(s.substring(last,length));
break;
} else if (index<s.length()) {
- v.add(s.substring(last,index));
+ v.addElement(s.substring(last,index));
last=index+1;
} else {
break;
@@ -463,6 +466,16 @@ public class Ivy implements Runnable {
return s;
}
+ public String domains(String toparse) {
+ String s="broadcasting on ";
+ Ivy.Domain[] d = parseDomains(toparse);
+ for (int index=0;index<d.length;index++) {
+ s+=d[index].getDomainaddr()+":"+d[index].getPort()+" ";
+ }
+ return s;
+ }
+
+
class Domain {
private String domainaddr;
private int port;