public void handleMessage(String msg) throws IOException
	{
		int type = parseType(msg);
		String text = msg.substring(msg.indexOf(' ')).trim();

		switch (type)
		{
			case MessageProtocols.TERMINATE:
			{
				polling = false;
			}
				break;

			case MessageProtocols.REGISTER:
			{
				registerUser(text);
			}
				break;

			case MessageProtocols.UNREGISTER:
			{
				unregisterUser(text);
			}
				break;

			case MessageProtocols.STATUS_REQUEST:
			{
				// Maybe clear the client list.
			}
				break;

			case MessageProtocols.USER_MESSAGE:
			{
				log.info("Received:[" + MessageProtocols.EVENT_NAMES[type]
						+ "][" + text + "]");
			}
				break;

			default:
				// do Nothing.
		}
	}