Interface HttpContainer


public interface HttpContainer
Interface provided by containers that will handle requests from the HTTP dispatcher.
  • Method Summary

    Modifier and Type
    Method
    Description
    Examine the inbound request to ensure the container is configured to handle the incoming request and construct a runnable for request execution.
  • Method Details

    • createRunnableHandler

      Runnable createRunnableHandler(HttpInboundConnection inboundConnection)
      Examine the inbound request to ensure the container is configured to handle the incoming request and construct a runnable for request execution.

      Request processing should not be performed during this method-- it should wait for invocation of the runnable via the ExecutorService for proper workload balancing/scheduling.

      The container should not assume that the runnable will be invoked on the same thread that called this method. Any state that should be saved between the creation and invocation of the runnable should/can be stored in the runnable instance itself.

      Parameters:
      inboundConnection - HttpInboundConnection containing information inbound request: remote host/port, HttpRequest containing the URI and method.
      Returns:
      A runnable for the dispatcher to use to queue the work to the container, or null if the container can not handle the inbound request (e.g. an unknown context root or URI).