Android APIs
public interface

HttpServerConnection

implements HttpConnection
org.apache.http.HttpServerConnection
Known Indirect Subclasses

Class Overview

An HTTP connection for use on the server side. Requests are received, responses are sent.

Summary

Public Methods
abstract void flush()
Sends all pending buffered data over this connection.
abstract void receiveRequestEntity(HttpEntityEnclosingRequest request)
Receives the next request entity available from this connection and attaches it to an existing request.
abstract HttpRequest receiveRequestHeader()
Receives the request line and all headers available from this connection.
abstract void sendResponseEntity(HttpResponse response)
Sends the response entity of a response over this connection.
abstract void sendResponseHeader(HttpResponse response)
Sends the response line and headers of a response over this connection.
[Expand]
Inherited Methods
From interface org.apache.http.HttpConnection

Public Methods

public abstract void flush ()

Added in API level 1

Sends all pending buffered data over this connection.

Throws
IOException

public abstract void receiveRequestEntity (HttpEntityEnclosingRequest request)

Added in API level 1

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
IOException
HttpException

public abstract HttpRequest receiveRequestHeader ()

Added in API level 1

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
IOException
HttpException

public abstract void sendResponseEntity (HttpResponse response)

Added in API level 1

Sends the response entity of a response over this connection.

Parameters
response the response whose entity to send.
Throws
HttpException
IOException
HttpException

public abstract void sendResponseHeader (HttpResponse response)

Added in API level 1

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

Parameters
response the response whose headers to send.
Throws
HttpException
IOException
HttpException