Class HttpTransportOverFCGI

java.lang.Object
org.eclipse.jetty.fcgi.server.HttpTransportOverFCGI
All Implemented Interfaces:
HttpTransport

public class HttpTransportOverFCGI extends Object implements HttpTransport
  • Constructor Details

    • HttpTransportOverFCGI

      public HttpTransportOverFCGI(ByteBufferPool byteBufferPool, boolean useDirectByteBuffers, boolean sendStatus200, Flusher flusher, int request)
  • Method Details

    • send

      public void send(MetaData.Request request, MetaData.Response response, ByteBuffer content, boolean lastContent, Callback callback)
      Description copied from interface: HttpTransport
      Asynchronous call to send a response (or part) over the transport
      Specified by:
      send in interface HttpTransport
      Parameters:
      request - True if the response if for a HEAD request (and the data should not be sent).
      response - The header info to send, or null if just sending more data. The first call to send for a response must have a non null info.
      content - A buffer of content to be sent.
      lastContent - True if the content is the last content for the current response.
      callback - The Callback instance that success or failure of the send is notified on
    • isPushSupported

      public boolean isPushSupported()
      Specified by:
      isPushSupported in interface HttpTransport
      Returns:
      true if responses can be pushed over this transport
    • push

      public void push(MetaData.Request request)
      Specified by:
      push in interface HttpTransport
      Parameters:
      request - A request to use as the basis for generating a pushed response.
    • generateResponseHeaders

      protected Generator.Result generateResponseHeaders(MetaData.Response info, Callback callback)
    • generateResponseContent

      protected Generator.Result generateResponseContent(ByteBuffer buffer, boolean lastContent, Callback callback)
    • abort

      public void abort(Throwable failure)
      Description copied from interface: HttpTransport
      Aborts this transport.

      This method should terminate the transport in a way that can indicate an abnormal response to the client, for example by abruptly close the connection.

      This method is called when an error response needs to be sent, but the response is already committed, or when a write failure is detected. If abort is called, HttpTransport.onCompleted() is not called

      Specified by:
      abort in interface HttpTransport
      Parameters:
      failure - the failure that caused the abort.
    • onCompleted

      public void onCompleted()
      Description copied from interface: HttpTransport
      Called to indicated the end of the current request/response cycle (which may be some time after the last content is sent).
      Specified by:
      onCompleted in interface HttpTransport