public synchronized void depose(Object obj) {\r
while(isFull()) {\r
try {\r
+ System.out.println("Buffer is full: " + Thread.currentThread().getName()\r
+ + " is waiting, size: " + nbObj);\r
+\r
wait();\r
}\r
catch (InterruptedException e) {}\r
public synchronized Object preleve() {\r
while(isEmpty()) {\r
try {\r
+ System.out.println("Buffer is empty: " + Thread.currentThread().getName()\r
+ + " is waiting, size: " + nbObj);\r
wait();\r
}\r
catch (InterruptedException e) {}\r