예제 #1
0
  private void setupHttpHandler() {

    serverConfig.addJmxEventListener(httpHandlerChain);

    synchronized (serverConfig.handlersSync) {
      for (final HttpHandler httpHandler : serverConfig.orderedHandlers) {
        final String[] mappings = serverConfig.handlers.get(httpHandler);
        httpHandlerChain.addHandler(httpHandler, mappings);
      }
    }
    httpHandlerChain.start();
  }
예제 #2
0
 /** Modifies handlers mapping during runtime. */
 synchronized void onAddHttpHandler(HttpHandler httpHandler, String[] mapping) {
   if (isStarted()) {
     httpHandlerChain.addHandler(httpHandler, mapping);
   }
 }