private void startAgentWebApp(MapOperations appInformation,
Configuration serviceConf) {
LOG_YARN.info("AM classpath:" + ((URLClassLoader) AgentWebApp.class.getClassLoader() ).getURLs());
// Start up the agent web app and track the URL for it
AgentWebApp agentWebApp = AgentWebApp.$for(AgentWebApp.BASE_PATH,
new WebAppApiImpl(this,
stateForProviders,
providerService,
certificateManager),
RestPaths.AGENT_WS_CONTEXT)
.withComponentConfig(getInstanceDefinition().getAppConfOperations()
.getComponent(SliderKeys.COMPONENT_AM))
.start();
agentAccessUrl = "https://" + appMasterHostname + ":" + agentWebApp.getSecuredPort();
AgentService agentService =
new AgentService("slider-agent", agentWebApp);
agentService.init(serviceConf);
agentService.start();
addService(agentService);
appInformation.put(StatusKeys.INFO_AM_AGENT_URL, agentAccessUrl + "/");
appInformation.set(StatusKeys.INFO_AM_AGENT_PORT, agentWebApp.getPort());
appInformation.set(StatusKeys.INFO_AM_SECURED_AGENT_PORT,
agentWebApp.getSecuredPort());
}