public void start() {

		try {
			/*
			 * Create server socket, start registry server on another port
			 */
			ServerSocket server = new ServerSocket(PORT);
			new Thread(registry).start();
			while (!shutDown) {
				/*
				 * Initialize connection with client
				 */
				Socket client = server.accept();
				ObjectOutputStream out = new ObjectOutputStream(
						client.getOutputStream());
				ObjectInputStream in = new ObjectInputStream(
						client.getInputStream());
				/*
				 * Invoke the method specified by client
				 */
				try {
					RMIMessage message = (RMIMessage) in.readObject();
					Object onCall = remoteToLocal.get(message.getKey());
					RMIExecutor executor = new RMIExecutor(onCall,
							message.getMethodName(), message.getArgv(),
							message.getArgType(), client, out);
					new Thread(executor).start();

				} catch (ClassNotFoundException e) {
					/*
					 * Invalid message type, throw a remote exception
					 */
					RMIMessage wrong = new RMIMessage(new Remote440Exception(
							"Unrecognized Message Type"));
					out.writeObject(wrong);
					client.close();
				}

			}
			server.close();
		} catch (IOException e) {
			System.err.println("Server starts fail");
			e.printStackTrace();
		}

	}