X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/jaceP2P.git/blobdiff_plain/11170cbb29697a8df7bf66cbfc71b5be536df839..90623bf0db7a268b9c697e64f1bb6be61545af31:/src/jaceP2P/Register.java diff --git a/src/jaceP2P/Register.java b/src/jaceP2P/Register.java index 55600ac..e6f88cf 100644 --- a/src/jaceP2P/Register.java +++ b/src/jaceP2P/Register.java @@ -41,8 +41,9 @@ public class Register implements java.io.Serializable, java.lang.Cloneable { public synchronized int existNode(Node node) { if (node == null) { - System.out - .println("!!!!!!!!!!!!!!!!!!!!!!!!! node est null ds existNode"); + System.err + .println("Node est null dans existNode"); + return -1 ; } int existe = -1; int index = 0; @@ -64,8 +65,8 @@ public class Register implements java.io.Serializable, java.lang.Cloneable { public synchronized void addNode(Node host) { int is = -1; if (host == null) { - System.out - .println("ds Register.addNode : host.getIP() == null !!!!!!!!!!!!!!!"); + System.err + .println("In Register.addNode : host.getIP() == null !"); } is = existNodeOfStub(host.getStub()); if (is != -1) { @@ -86,8 +87,9 @@ public class Register implements java.io.Serializable, java.lang.Cloneable { public synchronized int existNodeOfStub(JaceInterface stub) { // System.out.println("remote " + stub + "\n\n"); if (stub == null) { - System.out - .println("!!!!!!!!!!!!!!!!!!!!!!!!! stub = NULL ds existNodeOfStub = "); + System.err + .println("Stub = NULL in existNodeOfStub"); + return -1 ; } int existe = -1; int index = 0; @@ -107,8 +109,8 @@ public class Register implements java.io.Serializable, java.lang.Cloneable { return null; } else { if (stub == null) { - System.out - .println("ds Register.getNodeOfStub : stub == null !!!!!!!!!!!!!!!"); + System.err + .println("In Register.getNodeOfStub : stub == null !"); } is = existNodeOfStub(stub); if (is != -1) { @@ -126,8 +128,8 @@ public class Register implements java.io.Serializable, java.lang.Cloneable { return null; } else { if (name == null) - System.out - .println("ds Register.getNodeOfName : name == null !!!!!!!!!!!!!!!"); + System.err + .println("In Register.getNodeOfName : name == null !"); int index = 0; while ((is == -1) && (index < liste.size())) { @@ -224,7 +226,7 @@ public class Register implements java.io.Serializable, java.lang.Cloneable { try { ((Node) liste.elementAt(i)).getOutputStream().close(); } catch (Exception e) { - System.out.println("unable to close outputStream :" + e); + System.err.println("Unable to close outputStream :" + e); } } liste.clear(); @@ -258,7 +260,7 @@ public class Register implements java.io.Serializable, java.lang.Cloneable { String inter = "\n\t"; String count = ""; if (liste.isEmpty()) { - System.out.println("My Register is empty !!!!!"); + System.err.println("My Register is empty !!!!!"); } else { for (int i = 0; i < liste.size(); i++) { noeud = getNodeAt(i);