Package org.apache.http
Interface HttpServerConnection
- All Superinterfaces:
HttpConnection
- All Known Implementing Classes:
AbstractHttpServerConnection,DefaultHttpServerConnection,SocketHttpServerConnection
public interface HttpServerConnection extends HttpConnection
An HTTP connection for use on the server side.
Requests are received, responses are sent.
- Since:
- 4.0
- Version:
- $Revision: 542199 $
- Author:
- Oleg Kalnichevski
-
Method Summary
Modifier and Type Method Description voidflush()Sends all pending buffered data over this connection.voidreceiveRequestEntity(HttpEntityEnclosingRequest request)Receives the next request entity available from this connection and attaches it to an existing request.HttpRequestreceiveRequestHeader()Receives the request line and all headers available from this connection.voidsendResponseEntity(HttpResponse response)Sends the response entity of a response over this connection.voidsendResponseHeader(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 Details
-
receiveRequestHeader
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:
HttpExceptionIOException
-
receiveRequestEntity
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:
HttpExceptionIOException
-
sendResponseHeader
Sends the response line and headers of a response over this connection.- Parameters:
response- the response whose headers to send.- Throws:
HttpExceptionIOException
-
sendResponseEntity
Sends the response entity of a response over this connection.- Parameters:
response- the response whose entity to send.- Throws:
HttpExceptionIOException
-
flush
Sends all pending buffered data over this connection.- Throws:
IOException
-