Top Description Methods
org.apache.http

public Interface HttpServerConnection

extends HttpConnection
Known Direct Implementers
org.apache.http.impl.AbstractHttpServerConnection, org.apache.http.impl.DefaultBHttpServerConnection
Imports
java.io.IOException

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

Method Summary

Modifier and TypeMethod and Description
public void
flush()

Sends all pending buffered data over this connection.

public void
receiveRequestEntity(HttpEntityEnclosingRequest
the request to attach the entity to.
request
)

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

public HttpRequest

Returns:

a new HttpRequest object whose request line and headers are initialized.
receiveRequestHeader
()

Receives the request line and all headers available from this connection.

public void
sendResponseEntity(HttpResponse
the response whose entity to send.
response
)

Sends the response entity of a response over this connection.

public void
sendResponseHeader(HttpResponse
the response whose headers to send.
response
)

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

Inherited from org.apache.http.HttpConnection:
closegetMetricsgetSocketTimeoutisOpenisStalesetSocketTimeoutshutdown

Method Detail

flushback to summary
public void flush() throws IOException

Sends all pending buffered data over this connection.

Exceptions
IOException:
in case of an I/O error
receiveRequestEntityback to summary
public 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:HttpEntityEnclosingRequest

the request to attach the entity to.

Exceptions
HttpException:
in case of HTTP protocol violation
IOException:
in case of an I/O error
receiveRequestHeaderback to summary
public 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:HttpRequest

a new HttpRequest object whose request line and headers are initialized.

Exceptions
HttpException:
in case of HTTP protocol violation
IOException:
in case of an I/O error
sendResponseEntityback to summary
public void sendResponseEntity(HttpResponse response) throws HttpException, IOException

Sends the response entity of a response over this connection.

Parameters
response:HttpResponse

the response whose entity to send.

Exceptions
HttpException:
in case of HTTP protocol violation
IOException:
in case of an I/O error
sendResponseHeaderback to summary
public void sendResponseHeader(HttpResponse response) throws HttpException, IOException

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

Parameters
response:HttpResponse

the response whose headers to send.

Exceptions
HttpException:
in case of HTTP protocol violation
IOException:
in case of an I/O error