public void run()
	{
		while (true) {
			ByteBuffer message = null;
			try {
				System.out.println("[MessageThread] Waiting for a message...");
				message = queue.take();
			} catch (InterruptedException e1) {
				e1.printStackTrace();
			}
			System.out.println("[MessageThread] Operating a new message, "
					+queue.size()
					+" messages left to operate.");
			byte type = message.get();
			message.get();
			message.get();
			message.get();
			byte[] byteAddress = new byte[4];
			//Getting source address
			for (int j = 0; j<4; j++) {
				byteAddress[j] = message.get();
			}
			IP sourceAddress = new IP(byteAddress);
			switch (type) {
			case helloType:
				HelloMessage hello = new HelloMessage(adaptBuffer(message));
				hello.display();
				helloTable.addHello(sourceAddress, hello);
				break;
			case lsaType:
				LSAMessage lsa = new LSAMessage(adaptBuffer(message));
				lsa.display();
				lsaTable.addLSA(sourceAddress, lsa);
				break;
			}
		}
	}