@Override
	public void messageReceived(Message msg) {
		/**
		 * same as GridScheduler
		 */
		if(msg instanceof ControlMessage){
			ControlMessage controlMessage = (ControlMessage)msg;
			
			// resource manager wants to join this grid scheduler 
			// when a new RM is added, its load is set to Integer.MAX_VALUE to make sure
			// no jobs are scheduled to it until we know the actual load
			if (controlMessage.getType() == ControlMessageType.ResourceManagerJoin){
				resourceManagerLoad.put(controlMessage.getUrl(), Integer.MAX_VALUE);
			}
			// resource manager wants to offload a job to us 
			if (controlMessage.getType() == ControlMessageType.AddJob){
				jobQueue.add(controlMessage.getJob());
			}
			// resource manager wants to offload a job to us 
			if (controlMessage.getType() == ControlMessageType.ReplyLoad){
				resourceManagerLoad.put(controlMessage.getUrl(),controlMessage.getILoad());
			}
		}
		/**
		 * 
		 */
		else{ //"normal message"
			//TODO 
		}
	}