Code example for HttpRequestHandlerRegistry

Methods: register

     * All HttpRequestHandlers added after start() will be ignored 
     * @param pattern Patterns may have three formats: * or *<uri> or <uri>* 
     * @param handler A request handler 
    public void addRequestHandler(String pattern, HttpRequestHandler handler) {
        registry.register(pattern, handler);
    public void start() throws IOException { 
        if (running) return;
        requestListenerThread = new RequestListenerThread(port, registry);
        running = true;
    public void stop() { 
        if (!running) return;
        try { 
                requestListenerThread = null;
Contextual code suggestions in your IDE  Get Codota for Java