public AgentController(Condition eventSyncCondition, AgentConfig agentConfig) throws GrinderException {
this.m_eventSyncCondition = eventSyncCondition;
this.agentConfig = agentConfig;
this.version = agentConfig.getInternalProperties().getProperty(PROP_INTERNAL_NGRINDER_VERSION);
this.m_agentControllerServerListener = new AgentControllerServerListener(m_eventSynchronisation, LOGGER);
// Set it with the default name
this.m_agentIdentity = new AgentControllerIdentityImplementation(agentConfig.getAgentHostID(), NetworkUtils.DEFAULT_LOCAL_HOST_ADDRESS);
this.m_agentIdentity.setRegion(agentConfig.getRegion());
this.agentSystemDataCollector = new SystemDataCollector();
this.agentSystemDataCollector.setAgentHome(agentConfig.getHome().getDirectory());