public void registerMessageHandlers(MessageDispatchRegistry messageDispatcher) {

		messageDispatcher.set(StartGrinderMessage.class, new AbstractMessageHandler<StartGrinderMessage>() {
			public void handle(StartGrinderMessage message) {
				m_logger.info("Received a start agent message");
				m_lastStartGrinderMessage = message;
				setReceived(START);
			}
		});

		messageDispatcher.set(StopGrinderMessage.class, new AbstractMessageHandler<StopGrinderMessage>() {
			public void handle(StopGrinderMessage message) {
				m_logger.info("Received a stop agent message");
				setReceived(STOP);
			}
		});

		messageDispatcher.set(AgentUpdateGrinderMessage.class, new AbstractMessageHandler<AgentUpdateGrinderMessage>() {
			public void handle(AgentUpdateGrinderMessage message) {
				m_logger.info("Received a agent update message {}", message.getNext());
				m_lastAgentUpdateGrinderMessage = message;
				setReceived(AGENT_UPDATE);
			}
		});
	}
Registers message handlers with a dispatcher.

@param messageDispatcher The dispatcher.
ngrinder-core/src/main/java/net/grinder/engine/communication/AgentControllerServerListener.java