package distributed.systems.core;

import distributed.systems.das.BattleField;
import distributed.systems.das.units.Unit;

public class SynchronizedSocket implements Socket{

	public SynchronizedSocket(Socket local) {
		// TODO Auto-generated constructor stub
	}

	@Override
	public void register(String serverid) {

	}

	@Override
	public void addMessageReceivedHandler(BattleField battleField) {

	}

	@Override
	public void addMessageReceivedHandler(Unit unit) {

	}

	@Override
	public void sendMessage(Message reply, String origin) {

	}

	@Override
	public void unRegister() {

	}
}

@@ -165,19 +165,50 @@
 s Socket
+ 
 %7B%0A%0A
+%09private final Socket local;%0A%0A
 %09public 
@@ -248,47 +248,27 @@
 %7B%0A%09%09
-// TODO Auto-generated constructor stub
+this.local = local;
 %0A%09%7D%0A
@@ -316,25 +316,57 @@
 serverid) %7B%0A
+%09%09this.local.register(serverid);
 %0A
-
 %09%7D%0A%0A%09@Overri
@@ -430,25 +430,77 @@
 tleField) %7B%0A
+%09%09this.local.addMessageReceivedHandler(battleField);
 %0A
-
 %09%7D%0A%0A%09@Overri
@@ -550,25 +550,70 @@
 nit unit) %7B%0A
+%09%09this.local.addMessageReceivedHandler(unit);
 %0A
-
 %09%7D%0A%0A%09@Overri
@@ -672,17 +672,57 @@
 igin) %7B%0A
+%09%09this.local.sendMessage(reply, origin);
 %0A
-
 %09%7D%0A%0A%09@Ov
@@ -756,14 +756,40 @@
 ter() %7B%0A
+%09%09this.local.unRegister();
 %0A%09%7D%0A%7D%0A

Implement synchronizedsocket-wrapper methods