Class LoggingCorsHttpServer


public class LoggingCorsHttpServer extends CorsHttpServer
CorsHttpServer subclass which performs logging to a given print stream at the HTTP level. Logging is not done through the logging system.
Since:
2 Feb 2011
Author:
Mark Taylor
  • Constructor Details

    • LoggingCorsHttpServer

      public LoggingCorsHttpServer(ServerSocket socket, OriginAuthorizer auth, PrintStream out) throws IOException
      Constructor.
      Parameters:
      socket - socket hosting the service
      auth - defines which domains requests will be permitted from
      out - destination stream for logging
      Throws:
      IOException
  • Method Details

    • serve

      public HttpServer.Response serve(HttpServer.Request request)
      Description copied from class: HttpServer
      Does the work for providing output corresponding to a given HTTP request. This implementation calls each Handler in turn and the first one to provide a non-null response is used.
      Overrides:
      serve in class CorsHttpServer
      Parameters:
      request - represents an HTTP request that has been received
      Returns:
      represents the content of an HTTP response that should be sent