Ejemplo n.º 1
0
 @Override
 public void init(ServletConfig config) throws ServletException {
   super.init(config);
   try {
     String ip = config.getInitParameter("org.zincapi.server.init");
     if (ip != null) global = Reflection.callStatic(ip, "initZinc", zinc);
   } catch (Exception ex) {
     throw new ServletException(ex);
   }
   try {
     /*
     AsyncProcessor support = new AsyncProcessor(framework.getAtmosphereConfig());
     support.morphToTextMessages();
      */
     AsyncSupport<?> support =
         (AsyncSupport<?>)
             Reflection.create(
                 this.getClass().getClassLoader(),
                 "org.atmosphere.container.Tomcat7AsyncSupportWithWebSocket",
                 framework.getAtmosphereConfig());
     framework.setAsyncSupport(support);
     framework.addAtmosphereHandler("/*", new TomcatResponder(zinc));
     framework.init(config);
   } catch (Exception ex) {
     throw new ServletException(ex);
   }
 }