3 /*************************************************
5 * Classe permettant d'échanger des objets entre *
6 * les différents programmes actifs. *
9 * Auteur : Sébastien Miquée -- miquee@gmail.com *
14 *************************************************/
18 import java.io.BufferedInputStream;
19 import java.io.BufferedOutputStream;
20 import java.io.IOException;
21 import java.io.ObjectInputStream;
22 import java.io.ObjectOutputStream;
23 import java.io.Serializable;
24 import java.net.ServerSocket;
25 import java.net.Socket;
27 import org.objectweb.proactive.Body;
28 import org.objectweb.proactive.api.PAActiveObject;
29 import org.objectweb.proactive.api.PAGroup;
30 import org.objectweb.proactive.api.PASPMD;
31 import org.objectweb.proactive.core.group.Group;
32 import org.objectweb.proactive.core.node.Node;
33 import org.objectweb.proactive.core.node.NodeException;
37 * This class permits to exchange Objects
38 * between ActiveObjects of a program. This class allows
39 * to exchange multiple data with the same receiver with
40 * the use of tagged messages.
42 * @author Sébastien Miquée
45 public class AILObject implements Serializable
47 private static final long serialVersionUID = 1L ;
48 /** Local variables **/
49 protected int myId = -1 ;
50 protected MessageList ml ;
51 protected int groupsize = 0 ;
52 protected Object lockint ;
53 protected Object locktint ;
54 protected Object lockdouble ;
55 protected Object locktdouble ;
56 protected Object lockbool ;
57 protected Object locktbool ;
58 private int mode = 0 ; // 0 : RMI ; 1 : Socket
59 protected Group<AILObject> group ;
60 private ServerSock servsock = null ;
61 private short cdirectory ;
62 protected String tab_url[] ;
63 protected short tab_port[] ;
64 protected String url = "" ;
65 protected short port = -1 ;
66 private short init = 0 ;
70 * Empty constructor for the Stub generation.
76 * Set the communication mode of the library\n
77 * - 0 : RMI protocole\n
78 * - 1 : Socket protocole\n
79 * @param _mode : communication mode
81 public void setMode( int _mode )
88 if( _mode == 1 && mode != 1 )
92 n = PAActiveObject.getNode() ;
93 } catch( NodeException e1 ) {
94 e1.printStackTrace() ;
97 url = n.getNodeInformation().getURL().split("/")[2].split(":")[0] ;
99 servsock = new ServerSock( ) ;
105 if( _mode == 0 && mode == 1)
110 mode = (short) _mode ;
113 protected void setUrl( String _url )
118 public String getUrl( )
123 protected void setPort( short _port )
135 * Return the communication mode of the library
136 * @return the communication mode
144 * Print the url on which this active object is.
146 public void echoUrl()
149 body = PAActiveObject.getBodyOnThis() ;
150 int rank = PASPMD.getMyRank() ;
152 System.out.println("I am AILObject " + rank + " on node " + body.getNodeURL() ) ;
155 private void createDirectory()
157 if( cdirectory == 0 )
159 PASPMD.totalBarrier( "Directory Creation" ) ;
162 for( i = 0 ; i < groupsize ; i++ )
166 tab_url[i] = group.get(i).getUrl() ;
167 tab_port[i] = (short) group.get(i).getPort() ;
169 tab_url[i] = this.url ;
170 tab_port[i] = this.port ;
188 * Initialization of the object AILObject.
190 public void AILinit( )
194 PASPMD.totalBarrier( "Init" ) ;
196 lockint = new Object() ;
197 locktint = new Object() ;
198 lockdouble = new Object() ;
199 locktdouble = new Object() ;
200 lockbool = new Object() ;
201 locktbool = new Object() ;
203 group = PAGroup.getGroup( (AILObject) PASPMD.getSPMDGroup() ) ;
204 myId = PASPMD.getMyRank() ;
205 groupsize = PASPMD.getMySPMDGroupSize() ;
207 ml = new MessageList( groupsize + 1 ) ;
209 tab_url = new String[groupsize] ;
210 tab_port = new short[groupsize] ;
213 /** Parallelization of methods, to non block the Object **/
214 PAActiveObject.setImmediateService( "getUrl", new Class[]{}) ;
215 PAActiveObject.setImmediateService( "getPort", new Class[]{}) ;
217 PAActiveObject.setImmediateService( "getIntBl", new Class[]{int.class, int.class}) ;
218 PAActiveObject.setImmediateService( "getTabIntBl", new Class[]{int.class, int.class}) ;
219 PAActiveObject.setImmediateService( "getDoubleBl", new Class[]{int.class, int.class}) ;
220 PAActiveObject.setImmediateService( "getTabDoubleBl", new Class[]{int.class, int.class}) ;
221 PAActiveObject.setImmediateService( "getBoolBl", new Class[]{int.class, int.class}) ;
222 PAActiveObject.setImmediateService( "getTabBoolBl", new Class[]{int.class, int.class}) ;
224 PAActiveObject.setImmediateService( "recvObject", new Class[]{int.class, int.class, int.class}) ;
225 PAActiveObject.setImmediateService( "recvObject", new Class[]{int.class, int[].class, int.class}) ;
226 PAActiveObject.setImmediateService( "recvObject", new Class[]{int.class, double.class, int.class}) ;
227 PAActiveObject.setImmediateService( "recvObject", new Class[]{int.class, double[].class, int.class}) ;
228 PAActiveObject.setImmediateService( "recvObject", new Class[]{int.class, boolean.class, int.class}) ;
229 PAActiveObject.setImmediateService( "recvObject", new Class[]{int.class, boolean[].class, int.class}) ;
235 /*********************/
236 /** Sending Objects **/
237 /*********************/
240 * Send an Integer _o from the id id_src with the tag _tag.
241 * Puts a new Message, composed of the Integer _o and the tag _tag
242 * in the MessageList of this object.
243 * @param _int : the Integer to send.
244 * @param idDst : the id of the sender.
245 * @param _tag : the tag of the Message.
247 protected void sendObject( int _idDst, int _int, int _tag )
249 if( _idDst >= 0 && _idDst < groupsize + 1 )
251 if( mode == 0 ) // RMI
253 ((AILObject)group.get( _idDst )).recvObject( myId, _int, _tag ) ;
256 if( mode == 1 ) // Socket
259 Socket soc = new Socket() ;
261 soc = new Socket( tab_url[_idDst], tab_port[_idDst] ) ;
263 soc.setReuseAddress( true ) ;
264 soc.setSendBufferSize( 2048 * 2048 ) ;
265 soc.setSoLinger( false, 1 ) ;
266 soc.setTcpNoDelay( false ) ;
268 BufferedOutputStream out = new BufferedOutputStream( soc.getOutputStream() );
270 ObjectOutputStream output = new ObjectOutputStream( out ) ;
272 output.writeObject( new MessageInt( myId, _tag, _int ) ) ;
278 } catch( Exception e ) {
279 e.printStackTrace() ;
287 * Reception of an Integer with the RMI method
288 * @param _idSrc : id of the sender
289 * @param _int : the Integer to receive
290 * @param _tag : the tag of the message
292 public void recvObject( int _idSrc, int _int, int _tag )
294 if( _idSrc >= 0 && _idSrc < groupsize + 1 )
296 ml.addMessage( _idSrc, new MessageInt( _tag, _int ) ) ;
298 synchronized( lockint )
307 * Send a tabular of Integers _tint to the id idDst with the tag _tag.
308 * Puts a new Message, composed of the tabular of Integers _tint and the tag _tag
309 * in the MessageList of this object.
310 * @param _tint : the tabular of Integers to send.
311 * @param idDst : the id of the receiver.
312 * @param _tag : the tag of the Message.
314 protected void sendObject( int _idDst, int[] _tint, int _tag )
316 if( _idDst >= 0 && _idDst < groupsize + 1 )
318 if( mode == 0 ) // RMI
320 ((AILObject)group.get( _idDst )).recvObject( myId, _tint, _tag ) ;
323 if( mode == 1 ) // Socket
326 Socket soc = new Socket() ;
328 soc = new Socket( tab_url[_idDst], tab_port[_idDst] ) ;
330 soc.setReuseAddress( true ) ;
331 soc.setSendBufferSize( 2048 * 2048 ) ;
332 soc.setSoLinger( false, 1 ) ;
333 soc.setTcpNoDelay( false ) ;
335 BufferedOutputStream out = new BufferedOutputStream( soc.getOutputStream() );
337 ObjectOutputStream output = new ObjectOutputStream( out ) ;
339 output.writeObject( new MessageTabInt( myId, _tag, _tint ) ) ;
345 } catch( Exception e ) {
346 e.printStackTrace() ;
354 * Reception of a tabular of Integers with the RMI method
355 * @param _idSrc : id of the sender
356 * @param _tint : the tabular of Integers to receive
357 * @param _tag : the tag of the message
359 public void recvObject( int _idSrc, int[] _tint, int _tag )
361 if( _idSrc >= 0 && _idSrc < groupsize + 1 )
363 ml.addMessage( _idSrc, new MessageTabInt( _tag, _tint ) ) ;
365 synchronized( locktint )
367 locktint.notifyAll();
374 * Send a Double _double to the id idDst with the tag _tag.
375 * Puts a new Message, composed of the Double _double and the tag _tag
376 * in the MessageList of this object.
377 * @param _double : the Double to send.
378 * @param idDst : the id of the sender.
379 * @param _tag : the tag of the Message.
381 protected void sendObject( int _idDst, double _double, int _tag )
383 if( _idDst >= 0 && _idDst < groupsize + 1 )
385 if( mode == 0 ) // RMI
387 ((AILObject)group.get( _idDst )).recvObject( myId, _double, _tag ) ;
390 if( mode == 1 ) // Socket
393 Socket soc = new Socket() ;
395 soc = new Socket( tab_url[_idDst], tab_port[_idDst] ) ;
397 soc.setReuseAddress( true ) ;
398 soc.setSendBufferSize( 2048 * 2048 ) ;
399 soc.setSoLinger( false, 1 ) ;
400 soc.setTcpNoDelay( false ) ;
402 BufferedOutputStream out = new BufferedOutputStream( soc.getOutputStream() );
404 ObjectOutputStream output = new ObjectOutputStream( out ) ;
406 output.writeObject( new MessageDouble( myId, _tag, _double ) ) ;
412 } catch( Exception e ) {
413 e.printStackTrace() ;
421 * Reception of a Double with the RMI method
422 * @param _idSrc : id of the sender
423 * @param _double : the double to receive
424 * @param _tag : the tag of the message
426 public void recvObject( int _idSrc, double _double, int _tag )
428 if( _idSrc >= 0 && _idSrc < groupsize + 1 )
430 ml.addMessage( _idSrc, new MessageDouble( _tag, _double ) ) ;
432 synchronized( lockdouble )
434 lockdouble.notifyAll();
440 * Send a tabular of Doubles _tint to the id idDst with the tag _tag.
441 * Puts a new Message, composed of the tabular of Doubles _tint and the tag _tag
442 * in the MessageList of this object.
443 * @param _tdouble : the tabular of Doubles to send.
444 * @param idDst : the id of the receiver.
445 * @param _tag : the tag of the Message.
447 protected void sendObject( int _idDst, double[] _tdouble, int _tag )
449 if( _idDst >= 0 && _idDst < groupsize + 1 )
451 if( mode == 0 ) // RMI
453 ((AILObject)group.get( _idDst )).recvObject( myId, _tdouble, _tag ) ;
456 if( mode == 1 ) // Socket
459 Socket soc = new Socket() ;
461 soc = new Socket( tab_url[_idDst], tab_port[_idDst] ) ;
463 soc.setReuseAddress( true ) ;
464 soc.setSendBufferSize( 2048 * 2048 ) ;
465 soc.setSoLinger( false, 1 ) ;
466 soc.setTcpNoDelay( false ) ;
468 BufferedOutputStream out = new BufferedOutputStream( soc.getOutputStream() );
470 ObjectOutputStream output = new ObjectOutputStream( out ) ;
472 output.writeObject( new MessageTabDouble( myId, _tag, _tdouble ) ) ;
478 } catch( Exception e ) {
479 e.printStackTrace() ;
487 * Reception of a tabular of Doubles with the RMI method
488 * @param _idSrc : id of the sender
489 * @param _tdouble : the tabular of Doubles to receive
490 * @param _tag : the tag of the message
492 public void recvObject( int _idSrc, double[] _tdouble, int _tag )
494 if( _idSrc >= 0 && _idSrc < groupsize + 1 )
496 ml.addMessage( _idSrc, new MessageTabDouble( _tag, _tdouble ) ) ;
498 synchronized( locktdouble )
500 locktdouble.notifyAll();
507 * Send a Boolean _bool to the id id_src with the tag _tag.
508 * Puts a new Message, composed of the Boolean _bool and the tag _tag
509 * in the MessageList of this object.
510 * @param _bool : the Boolean to send.
511 * @param idDst : the id of the receiver.
512 * @param _tag : the tag of the Message.
514 protected void sendObject( int _idDst, boolean _bool, int _tag )
516 if( _idDst >= 0 && _idDst < groupsize + 1 )
518 if( mode == 0 ) // RMI
520 ((AILObject)group.get( _idDst )).recvObject( myId, _bool, _tag ) ;
523 if( mode == 1 ) // Socket
526 Socket soc = new Socket() ;
528 soc = new Socket( tab_url[_idDst], tab_port[_idDst] ) ;
530 soc.setReuseAddress( true ) ;
531 soc.setSendBufferSize( 2048 * 2048 ) ;
532 soc.setSoLinger( false, 1 ) ;
533 soc.setTcpNoDelay( false ) ;
535 BufferedOutputStream out = new BufferedOutputStream( soc.getOutputStream() );
537 ObjectOutputStream output = new ObjectOutputStream( out ) ;
539 output.writeObject( new MessageBool( myId, _tag, _bool ) ) ;
545 } catch( Exception e ) {
546 e.printStackTrace() ;
554 * Reception of a Boolean with the RMI method
555 * @param _idSrc : id of the sender
556 * @param _bool : the boolean to receive
557 * @param _tag : the tag of the message
559 public void recvObject( int _idSrc, boolean _bool, int _tag )
561 if( _idSrc >= 0 && _idSrc < groupsize + 1 )
563 ml.addMessage( _idSrc, new MessageBool( _tag, _bool ) ) ;
565 synchronized( lockbool )
567 lockbool.notifyAll();
573 * Send a tabular of Booleans _tint to the id idDst with the tag _tag.
574 * Puts a new Message, composed of the tabular of Booleans _tint and the tag _tag
575 * in the MessageList of this object.
576 * @param _tbool : the tabular of Booleans to send.
577 * @param idDst : the id of the receiver.
578 * @param _tag : the tag of the Message.
580 protected void sendObject( int _idDst, boolean[] _tbool, int _tag )
582 if( _idDst >= 0 && _idDst < groupsize + 1 )
584 if( mode == 0 ) // RMI
586 ((AILObject)group.get( _idDst )).recvObject( myId, _tbool, _tag ) ;
589 if( mode == 1 ) // Socket
592 Socket soc = new Socket() ;
594 soc = new Socket( tab_url[_idDst], tab_port[_idDst] ) ;
596 soc.setReuseAddress( true ) ;
597 soc.setSendBufferSize( 2048 * 2048 ) ;
598 soc.setSoLinger( false, 1 ) ;
599 soc.setTcpNoDelay( false ) ;
601 BufferedOutputStream out = new BufferedOutputStream( soc.getOutputStream() );
603 ObjectOutputStream output = new ObjectOutputStream( out ) ;
605 output.writeObject( new MessageTabBool( myId, _tag, _tbool ) ) ;
611 } catch( Exception e ) {
612 e.printStackTrace() ;
620 * Reception of a tabular of Booleans with the RMI method
621 * @param _idSrc : id of the sender
622 * @param _tdouble : the tabular of Booleans to receive
623 * @param _tag : the tag of the message
625 public void recvObject( int _idSrc, boolean[] _tbool, int _tag )
627 if( _idSrc >= 0 && _idSrc < groupsize + 1 )
629 ml.addMessage( _idSrc, new MessageTabBool( _tag, _tbool ) ) ;
631 synchronized( locktbool )
633 locktbool.notifyAll();
639 /*******************************************/
640 /** Getting Objects - Non waiting methods **/
641 /*******************************************/
644 * Returns the Integer from the id id_src, with the tag _tag.
645 * Search in the MessageList if there is corresponding Message.
646 * @param id_src : index of the sender.
647 * @param _tag : tag of the Message.
648 * @return : the Integer.
650 public int getInt( int id_src, int _tag )
652 if( id_src >= 0 && id_src < groupsize + 1 )
654 MessageInt mes = (MessageInt) ml.searchMsg( id_src, _tag ) ;
658 return mes.getInt() ;
666 * Returns the tabular of Integers from the id id_src, with the tag _tag.
667 * Search in the MessageList if there is corresponding Message.
668 * @param id_src : index of the sender.
669 * @param _tag : tag of the Message.
670 * @return : the tabular of Integers.
672 public int[] getTabInt( int id_src, int _tag )
674 if( id_src >= 0 && id_src < groupsize + 1 )
676 MessageTabInt mes = (MessageTabInt) ml.searchMsg( id_src, _tag ) ;
680 return mes.getTabInt() ;
688 * Returns the Double from the id id_src, with the tag _tag.
689 * Search in the MessageList if there is corresponding Message.
690 * @param id_src : index of the sender.
691 * @param _tag : tag of the Message.
692 * @return : the Double.
694 public double getDouble( int id_src, int _tag )
696 if( id_src >= 0 && id_src < groupsize + 1 )
698 MessageDouble mes = (MessageDouble) ml.searchMsg( id_src, _tag ) ;
702 return mes.getDouble() ;
710 * Returns the tabular of Doubles from the id id_src, with the tag _tag.
711 * Search in the MessageList if there is corresponding Message.
712 * @param id_src : index of the sender.
713 * @param _tag : tag of the Message.
714 * @return : the tabular of Doubles.
716 public double[] getTabDouble( int id_src, int _tag )
718 if( id_src >= 0 && id_src < groupsize + 1 )
720 MessageTabDouble mes = (MessageTabDouble) ml.searchMsg( id_src, _tag ) ;
724 return mes.getTabDouble() ;
732 * Returns the Boolean from the id id_src, with the tag _tag.
733 * Search in the MessageList if there is corresponding Message.
734 * @param id_src : index of the sender.
735 * @param _tag : tag of the Message.
736 * @return : the Boolean.
738 public boolean getBool( int id_src, int _tag )
740 if( id_src >= 0 && id_src < groupsize + 1 )
742 MessageBool mes = (MessageBool) ml.searchMsg( id_src, _tag ) ;
746 return mes.getBool() ;
754 * Returns the tabular of Booleans from the id id_src, with the tag _tag.
755 * Search in the MessageList if there is corresponding Message.
756 * @param id_src : index of the sender.
757 * @param _tag : tag of the Message.
758 * @return : the tabular of Booleans.
760 public boolean[] getTabBool( int id_src, int _tag )
762 if( id_src >= 0 && id_src < groupsize + 1 )
764 MessageTabBool mes = (MessageTabBool) ml.searchMsg( id_src, _tag ) ;
768 return mes.getTabBool() ;
776 /***************************************/
777 /** Getting Objects - Waiting methods **/
778 /***************************************/
781 * Returns the Integer from the id id_src, with the tag _tag.
782 * Search in the MessageList if there is corresponding Message.
783 * Wait until a corresponding Message comes.
784 * @param id_src : index of the sender.
785 * @param _tag : tag of the Message.
786 * @return : the Integer.
788 public int getIntBl( int id_src, int _tag )
790 if( id_src >= 0 && id_src < groupsize + 1 )
792 MessageInt mes = null ;
796 mes = (MessageInt) ml.searchMsg( id_src, _tag ) ;
799 synchronized( lockint )
803 } catch (InterruptedException e) {
809 return mes.getInt() ;
816 * Returns the tabular of Integers from the id id_src, with the tag _tag.
817 * Search in the MessageList if there is corresponding Message.
818 * Wait until a corresponding Message comes.
819 * @param id_src : index of the sender.
820 * @param _tag : tag of the Message.
821 * @return : the tabular of Integers.
823 public int[] getTabIntBl( int id_src, int _tag )
825 if( id_src >= 0 && id_src < groupsize + 1 )
827 MessageTabInt mes = null ;
831 mes = (MessageTabInt) ml.searchMsg( id_src, _tag ) ;
834 synchronized( locktint )
838 } catch (InterruptedException e) {
844 return mes.getTabInt() ;
851 * Returns the Double from the id id_src, with the tag _tag.
852 * Search in the MessageList if there is corresponding Message.
853 * Wait until a corresponding Message comes.
854 * @param id_src : index of the sender.
855 * @param _tag : tag of the Message.
856 * @return : the Double.
858 public double getDoubleBl( int id_src, int _tag )
860 if( id_src >= 0 && id_src < groupsize + 1 )
862 MessageDouble mes = null ;
866 mes = (MessageDouble) ml.searchMsg( id_src, _tag ) ;
869 synchronized( lockdouble )
873 } catch (InterruptedException e) {
879 return mes.getDouble() ;
886 * Returns the tabular of Doubles from the id id_src, with the tag _tag.
887 * Search in the MessageList if there is corresponding Message.
888 * Wait until a corresponding Message comes.
889 * @param id_src : index of the sender.
890 * @param _tag : tag of the Message.
891 * @return : the tabular of Doubles.
893 public double[] getTabDoubleBl( int id_src, int _tag )
895 if( id_src >= 0 && id_src < groupsize + 1 )
897 MessageTabDouble mes = null ;
901 mes = (MessageTabDouble) ml.searchMsg( id_src, _tag ) ;
905 synchronized( locktdouble )
909 } catch (InterruptedException e) {
916 return mes.getTabDouble() ;
923 * Returns the Boolean from the id id_src, with the tag _tag.
924 * Search in the MessageList if there is corresponding Message.
925 * Wait until a corresponding Message comes.
926 * @param id_src : index of the sender.
927 * @param _tag : tag of the Message.
928 * @return : the Boolean.
930 public boolean getBoolBl( int id_src, int _tag )
932 if( id_src >= 0 && id_src < groupsize + 1 )
934 MessageBool mes = null ;
938 mes = (MessageBool) ml.searchMsg( id_src, _tag ) ;
941 synchronized( lockbool )
945 } catch (InterruptedException e) {
951 return mes.getBool() ;
958 * Returns the tabular of Booleans from the id id_src, with the tag _tag.
959 * Search in the MessageList if there is corresponding Message.
960 * Wait until a corresponding Message comes.
961 * @param id_src : index of the sender.
962 * @param _tag : tag of the Message.
963 * @return : the tabular of Booleans.
965 public boolean[] getTabBoolBl( int id_src, int _tag )
967 if( id_src >= 0 && id_src < groupsize + 1 )
969 MessageTabBool mes = null ;
973 mes = (MessageTabBool) ml.searchMsg( id_src, _tag ) ;
977 synchronized( locktbool )
981 } catch (InterruptedException e) {
988 return mes.getTabBool() ;
1000 class ServerSock extends Thread
1002 protected boolean ok ;
1003 protected boolean exec ;
1005 public ServerSock( )
1013 ServerSocket s = null ;
1017 /** Determination of the address and port to listen **/
1024 s = new ServerSocket( port );
1025 } catch (IOException e1) {
1031 System.out.println( "Unable to bind port !!" );
1035 System.out.println( "Binding address already in use !" ) ;
1039 System.out.println( "I am AILObject " + myId + " with address " + url +" on port " + port ) ;
1044 Socket soc = new Socket() ;
1048 soc.setReceiveBufferSize( 2048 * 2048 ) ;
1049 soc.setTcpNoDelay( false ) ;
1050 soc.setSoLinger( false, 1 ) ;
1051 soc.setReuseAddress( true ) ;
1053 new ServClientSock( soc ) ;
1056 } catch (Exception e) {
1057 e.printStackTrace() ;
1067 class ServClientSock extends Thread
1069 private BufferedInputStream in = null ;
1070 private Socket client = null ;
1072 public ServClientSock( Socket s ) throws IOException
1082 /** Receiving protocol :
1083 * --------------------
1084 * receiving integer which represents the id_src
1086 * receiving integer to indicate the type of data
1091 in = new BufferedInputStream( client.getInputStream() ) ;
1093 ObjectInputStream input = new ObjectInputStream( in ) ;
1095 Message m = (Message) input.readObject() ;
1097 ml.addMessage( m.getSender(), m ) ;
1103 } catch (IOException e) {
1104 e.printStackTrace();
1107 switch( m.getType() )
1110 synchronized( lockint )
1112 lockint.notifyAll();
1116 synchronized( locktint )
1118 locktint.notifyAll();
1122 synchronized( lockdouble )
1124 lockdouble.notifyAll();
1128 synchronized( locktdouble )
1130 locktdouble.notifyAll();
1134 synchronized( lockbool )
1136 lockbool.notifyAll();
1140 synchronized( locktbool )
1142 locktbool.notifyAll();
1148 } catch (IOException e) {
1149 e.printStackTrace();
1150 } catch (ClassNotFoundException e) {
1151 e.printStackTrace();
1162 /** La programmation est un art, respectons ceux qui la pratiquent !! **/