public MessageObject parseIncoming(MessageObject msg) {
		Node lookingFor = null;
		MessageObject returnObject = null;
		Object obj = null;
		switch (msg.getHead()) {
		case REQUEST_NODELIST:

			if (msg.getData() instanceof Set<?>) {
				Set<Node> remoteList = ((Set<Node>) msg.getData());
				returnObject = new MessageObject(Messages.RESPONSE_NODELIST, this.nodeMngr.getNodeTable());
				this.nodeMngr.mergeLists(remoteList);
				return returnObject;
			}
			break;

		case WHO_HAS:
			// Node with ip/port = sender Ip/port, name = looking for
			lookingFor = (Node) msg.getData();
			Node n = this.nodeMngr.lookUpName(lookingFor.getName());

			if (n != null) {
				returnObject = new MessageObject(Messages.I_DO, n);
			} else {
				// nod found send WHO_HAS across own nodeTable
				returnObject = new MessageObject(Messages.WHO_HAS, this.nodeMngr.getNodeTable());
			}

			return returnObject;

		case REQUEST_RESSOURCE:
			// difference between tcp and upd
			if (msg.getData() instanceof Node) {
				returnObject = udpRessourceRequest(msg);
			} else if (msg.getData() instanceof String) {
				obj = this.ressources.getRessource((String) msg.getData());
				returnObject = new MessageObject(Messages.REQUEST_RESSOURCE, obj);
			}
			return returnObject;

		case BROADCAST:
			return new MessageObject(Messages.BROADCAST, this.nodeMngr.getNodeTable());

		default:
			return new MessageObject(Messages.UNKNOW_REQUEST, msg.getHead().toString());
		}

		return new MessageObject(Messages.UNKNOW_REQUEST, msg.getHead().toString());
	}