Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.http
Interface HttpServerConnection

All Superinterfaces:
  Closeable, HttpConnection

All Known Implementing Classes:
  AbstractHttpServerConnection, DefaultBHttpServerConnection, DefaultHttpServerConnection, SocketHttpServerConnection

    public interface HttpServerConnection

extends HttpConnection

A server-side HTTP connection, which can be used for receiving requests and sending responses.

Since:
  4.0

Method Summary
`void` | `flush()` Sends all pending buffered data over this connection.
`void` | `receiveRequestEntity(HttpEntityEnclosingRequest request)` Receives the next request entity available from this connection and attaches it to an existing request.
`HttpRequest` | `receiveRequestHeader()` Receives the request line and all headers available from this connection.
`void` | `sendResponseEntity(HttpResponse response)` Sends the response entity of a response over this connection.
`void` | `sendResponseHeader(HttpResponse response)` Sends the response line and headers of a response over this connection.

Methods inherited from interface org.apache.http.HttpConnection
`close, getMetrics, getSocketTimeout, isOpen, isStale, setSocketTimeout, shutdown`

Method Detail

### receiveRequestHeader

    HttpRequest receiveRequestHeader()
                                     throws HttpException,
                                            IOException

  Receives the request line and all headers available from this connection. The caller should examine the returned request and decide if to receive a request entity as well.

  Returns:
    a new HttpRequest object whose request line and headers are initialized.
  Throws:
    `HttpException` - in case of HTTP protocol violation
    `IOException` - in case of an I/O error

### receiveRequestEntity

    void receiveRequestEntity(HttpEntityEnclosingRequest request)
                              throws HttpException,
                                     IOException

  Receives the next request entity available from this connection and attaches it to an existing request.

  Parameters:
    `request` - the request to attach the entity to.
  Throws:
    `HttpException` - in case of HTTP protocol violation
    `IOException` - in case of an I/O error

### sendResponseHeader

    void sendResponseHeader(HttpResponse response)
                            throws HttpException,
                                   IOException

  Sends the response line and headers of a response over this connection.

  Parameters:
    `response` - the response whose headers to send.
  Throws:
    `HttpException` - in case of HTTP protocol violation
    `IOException` - in case of an I/O error

### sendResponseEntity

    void sendResponseEntity(HttpResponse response)
                            throws HttpException,
                                   IOException

  Sends the response entity of a response over this connection.

  Parameters:
    `response` - the response whose entity to send.
  Throws:
    `HttpException` - in case of HTTP protocol violation
    `IOException` - in case of an I/O error

### flush

    void flush()
               throws IOException

  Sends all pending buffered data over this connection.

  Throws:
    `IOException` - in case of an I/O error

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.