예제 #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 onRemoveHttpHandler(HttpHandler httpHandler) {
   if (isStarted()) {
     httpHandlerChain.removeHttpHandler(httpHandler);
   }
 }
예제 #3
0
 /** Modifies handlers mapping during runtime. */
 synchronized void onAddHttpHandler(HttpHandler httpHandler, String[] mapping) {
   if (isStarted()) {
     httpHandlerChain.addHandler(httpHandler, mapping);
   }
 }
예제 #4
0
  private void tearDownHttpHandler() {

    httpHandlerChain.destroy();
  }