package ch.zhaw.mapreduce.plugins.socket;

import java.util.logging.Logger;

import javax.inject.Inject;

import ch.zhaw.mapreduce.Pool;
import de.root1.simon.annotation.SimonRemote;


@SimonRemote(RegistrationServer.class)
public class RegistrationServerImpl implements RegistrationServer {
	
	@Inject
	private Logger log;
	
	private final Pool pool;
	
	@Inject
	public RegistrationServerImpl(Pool pool) {
		this.pool = pool;
	}

	@Override
	public void register(String ip, int port, ClientCallback clientCallback) {
		log.info("New Worker: " + ip + ":" + port);
		// TODO erstelle socket worker 
		// adde zu pool
		clientCallback.acknowledge();
	}


}

@@ -292,35 +292,98 @@
 %0A%09%0A%09
-@Inject%0A%09private Logger log
+private static final Logger LOG = Logger.getLogger(RegistrationServerImpl.class.getName())
 ;%0A%09%0A
@@ -576,19 +576,19 @@
 ck) %7B%0A%09%09
-log
+LOG
 .info(%22N

use static logger