Remove obsolete debug messages
This commit is contained in:
@@ -82,10 +82,8 @@ public abstract class TcpClient extends Work implements Sender {
|
||||
|
||||
public final void work() {
|
||||
try {
|
||||
System.out.println("Client: Waiting for select... ");
|
||||
System.out.println("Client: Number of selected keys: " + selector.select());
|
||||
System.out.println("wakker");
|
||||
//selector.select();
|
||||
logger.debug("Client: Waiting for select... ");
|
||||
logger.debug("Client: Number of selected keys: " + selector.select());
|
||||
Set<SelectionKey> selectionKeySet = selector.selectedKeys();
|
||||
Iterator<SelectionKey> selectionKeyIterator = selectionKeySet.iterator();
|
||||
|
||||
|
||||
@@ -34,12 +34,9 @@ public class TcpServerClient extends Listen<byte[]> implements Sender {
|
||||
public void readable() throws IOException {
|
||||
int read;
|
||||
while (( read = socketChannel.read(byteBuffer)) > 0) {
|
||||
//byteBuffer.flip();
|
||||
byteBuffer.flip();
|
||||
byte[] buffer = byteBuffer.array();
|
||||
input(buffer);
|
||||
System.out.println("readable() " + new String(buffer).trim());
|
||||
byteBuffer.clear();
|
||||
byteBuffer.put(new byte[bufferSize]);
|
||||
byteBuffer.clear();
|
||||
}
|
||||
if (read < 0) {
|
||||
|
||||
@@ -54,7 +54,6 @@ public abstract class UdpMulticastClient extends Work {
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
System.out.println("client close socket");
|
||||
socket.close();
|
||||
super.stop();
|
||||
}
|
||||
|
||||
@@ -45,8 +45,6 @@ public class UdpMulticastServer extends Listen<byte[]> implements Sender {
|
||||
}
|
||||
|
||||
public void deactivate() throws DeactivateException {
|
||||
System.err.println("lets work the magic");
|
||||
|
||||
socket.close();
|
||||
super.deactivate();
|
||||
}
|
||||
|
||||
@@ -30,20 +30,15 @@ public abstract class Worker {
|
||||
|
||||
public boolean active() {
|
||||
logger.debug("Worker: active()");
|
||||
System.out.println(activate + " " + deactivate + " " + active + ": " + (deactivate || active));
|
||||
return deactivate || active;
|
||||
}
|
||||
|
||||
public final void run() {
|
||||
logger.debug("Worker: run()");
|
||||
while (run || deactivate) {
|
||||
System.err.println("xxx");
|
||||
runActivate();
|
||||
System.err.println("act");
|
||||
runDeactivate();
|
||||
System.err.println("deact");
|
||||
runWork();
|
||||
System.err.println("---" + getClass().getName() + run + " " + deactivate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,12 +104,10 @@ public abstract class Worker {
|
||||
|
||||
public void stop() {
|
||||
logger.debug("Worker: stop()");
|
||||
logger.debug("Worker: stop() " + active + " " + activate);
|
||||
if (active && !activate) {
|
||||
deactivate = true;
|
||||
}
|
||||
activate = false;
|
||||
logger.debug("Worker: stop() " + deactivate);
|
||||
}
|
||||
|
||||
abstract public void exit();
|
||||
|
||||
@@ -41,7 +41,6 @@ public class TestUdpMulticastCommunication {
|
||||
synchronized (client) {
|
||||
client.wait(2000);
|
||||
}
|
||||
System.err.println("after wait");
|
||||
byte[] buffer = client.buffer;
|
||||
assertNotNull("Received input", buffer);
|
||||
assertEquals("Message intact", message, new String(buffer).trim());
|
||||
@@ -56,7 +55,6 @@ public class TestUdpMulticastCommunication {
|
||||
|
||||
protected void input(byte[] buffer) {
|
||||
this.buffer = buffer;
|
||||
System.err.println("binnen");
|
||||
synchronized (this) {
|
||||
notifyAll();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user