Interface HttpInterceptor


public interface HttpInterceptor
Intercepts request handling when HttpResponder implements Interception.
Author:
Dr Michael Gardiner
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when the connection to the client is closed.
    void
    HttpHandler has received a new connectionabout about to start communications.
    void
    The request has be read and response is ready to write.
  • Method Details

    • startRequest

      void startRequest(SuperSocket client) throws IOException
      HttpHandler has received a new connectionabout about to start communications.
      Parameters:
      client - socket connected to the client.
      Throws:
      IOException - an exception occurred starting the interception.
    • startResponse

      void startResponse(HttpRequest request, HttpResponse response) throws IOException
      The request has be read and response is ready to write.

      Used for aborting interception based on request.

      Parameters:
      request - completed request
      response - generated response to intercept
      Throws:
      IOException - an exception occurred during the interception.
    • close

      void close() throws IOException
      Called when the connection to the client is closed.
      Throws:
      IOException - an exception occurred after the interception.