diff options
author | jestin | 2006-07-18 16:50:27 +0000 |
---|---|---|
committer | jestin | 2006-07-18 16:50:27 +0000 |
commit | e2d12584f2f3c78c3b49580e2160b032448c6f05 (patch) | |
tree | 30357176ec877406dfa6d59d70ee4149a0203512 | |
parent | d056e457e72e92353cba46b4311a55282ad2cc14 (diff) | |
download | ivy-java-e2d12584f2f3c78c3b49580e2160b032448c6f05.zip ivy-java-e2d12584f2f3c78c3b49580e2160b032448c6f05.tar.gz ivy-java-e2d12584f2f3c78c3b49580e2160b032448c6f05.tar.bz2 ivy-java-e2d12584f2f3c78c3b49580e2160b032448c6f05.tar.xz |
domain parsing changed a bit
-rwxr-xr-x | src/Ivy.java | 2 | ||||
-rwxr-xr-x | src/IvyWatcher.java | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/Ivy.java b/src/Ivy.java index 4101931..c548a40 100755 --- a/src/Ivy.java +++ b/src/Ivy.java @@ -263,6 +263,7 @@ public class Ivy implements Runnable { traceDebug("lib: "+libVersion+" protocol: "+PROTOCOLVERSION+" TCP service open on port "+applicationPort); Domain[] d = parseDomains(domainbus); + if (d.length==0) throw new IvyException("no domain found in "+domainbus); watcherId=getWBUId().replace(' ','*'); // no space in the watcherId // readies the rendezvous : an IvyWatcher (thread) per domain bus for (int index=0;index<d.length;index++) @@ -283,6 +284,7 @@ public class Ivy implements Runnable { d[index++]=new Domain(IvyWatcher.getDomain(s),IvyWatcher.getPort(s)); } catch (IvyException ie) { // do nothing + ie.printStackTrace(); } } // fixes the port values ... diff --git a/src/IvyWatcher.java b/src/IvyWatcher.java index 4b06b1b..52edb4b 100755 --- a/src/IvyWatcher.java +++ b/src/IvyWatcher.java @@ -320,7 +320,8 @@ class IvyWatcher implements Runnable { RE numbersPoint = new RE("([0-9]|\\.)+"); if (!numbersPoint.match(net)) { // traceDebug("should only have numbers and point ? I won't add anything... " + net); - return net; + return "127.255.255.255"; + // return net; } net += ".255.255.255"; RE exp = new RE( "^(\\d+\\.\\d+\\.\\d+\\.\\d+).*"); @@ -333,7 +334,7 @@ class IvyWatcher implements Runnable { System.out.println(e); System.exit(0); } - // System.out.println("debug: returning net=[" + net+ "]"); + //System.out.println("next domain: "+net); return net; } @@ -341,6 +342,7 @@ class IvyWatcher implements Runnable { int sep_index = net.lastIndexOf( ":" ); int port= ( sep_index == -1 ) ? 0 :Integer.parseInt( net.substring( sep_index +1 )); // System.out.println("net: ["+net+"]\nsep_index: "+sep_index+"\nport: "+port); + //System.out.println("next port: "+port); return port; } |