use of org.openremote.container.web.jsapi.JSAPIServlet in project openremote by openremote.
the class WebService method createJsApiHandler.
protected HttpHandler createJsApiHandler(IdentityService identityService, ResteasyDeployment resteasyDeployment) {
if (resteasyDeployment == null)
return null;
ServletInfo jsApiServlet = Servlets.servlet("RESTEasy JS Servlet", JSAPIServlet.class).setAsyncSupported(true).setLoadOnStartup(1).addMapping("/*");
DeploymentInfo deploymentInfo = new DeploymentInfo().setDeploymentName("RESTEasy JS Deployment").setContextPath(JSAPI_PATH).addServlet(jsApiServlet).setClassLoader(Container.class.getClassLoader());
deploymentInfo.addServletContextAttribute(ResteasyContextParameters.RESTEASY_DEPLOYMENTS, new HashMap<String, ResteasyDeployment>() {
{
put("", resteasyDeployment);
}
});
return addServletDeployment(identityService, deploymentInfo, false);
}
Aggregations