
package org.robotbrains.support.web.server.netty;

import io.netty.handler.codec.http.HttpRequest;

import org.robotbrains.support.web.server.HttpResponse;

/**
 * A handler for requests to the web server.
 * 
 * @author Keith M. Hughes
 */
public interface NettyWebServerRequestHandler {

  /**
   * Does the handler handle the request?
   * 
   * @param request
   *          the request
   * 
   * @return {@code true} if the request is handled by this handler
   */
      boolean isHandledBy(HttpRequest request);

  /**
   * Handle the request.
   * 
   * @param request
   *          the request
   * @param response
   *          the response
   */
      void handle(HttpRequest request, HttpResponse response);
}
