|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.impl.AbstractHttpServerConnection
public abstract class AbstractHttpServerConnection
Abstract server-side HTTP connection capable of transmitting and receiving data
using arbitrary SessionInputBuffer
and SessionOutputBuffer
Constructor Summary | |
---|---|
AbstractHttpServerConnection()
|
Method Summary | |
---|---|
protected abstract void |
assertOpen()
|
protected EntityDeserializer |
createEntityDeserializer()
|
protected EntitySerializer |
createEntitySerializer()
|
protected HttpRequestFactory |
createHttpRequestFactory()
|
protected HttpMessageParser |
createRequestParser(SessionInputBuffer buffer,
HttpRequestFactory requestFactory,
HttpParams params)
|
protected HttpMessageWriter |
createResponseWriter(SessionOutputBuffer buffer,
HttpParams params)
|
protected void |
doFlush()
|
void |
flush()
Sends all pending buffered data over this connection. |
HttpConnectionMetrics |
getMetrics()
Returns a collection of connection metrcis |
protected void |
init(SessionInputBuffer inbuffer,
SessionOutputBuffer outbuffer,
HttpParams params)
|
protected boolean |
isEof()
|
boolean |
isStale()
Checks whether this connection has gone down. |
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 class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.http.HttpConnection |
---|
close, getSocketTimeout, isOpen, setSocketTimeout, shutdown |
Constructor Detail |
---|
public AbstractHttpServerConnection()
Method Detail |
---|
protected abstract void assertOpen() throws java.lang.IllegalStateException
java.lang.IllegalStateException
protected EntityDeserializer createEntityDeserializer()
protected EntitySerializer createEntitySerializer()
protected HttpRequestFactory createHttpRequestFactory()
protected HttpMessageParser createRequestParser(SessionInputBuffer buffer, HttpRequestFactory requestFactory, HttpParams params)
protected HttpMessageWriter createResponseWriter(SessionOutputBuffer buffer, HttpParams params)
protected void init(SessionInputBuffer inbuffer, SessionOutputBuffer outbuffer, HttpParams params)
public HttpRequest receiveRequestHeader() throws HttpException, java.io.IOException
HttpServerConnection
receiveRequestHeader
in interface HttpServerConnection
HttpException
java.io.IOException
public void receiveRequestEntity(HttpEntityEnclosingRequest request) throws HttpException, java.io.IOException
HttpServerConnection
receiveRequestEntity
in interface HttpServerConnection
request
- the request to attach the entity to.
HttpException
java.io.IOException
protected void doFlush() throws java.io.IOException
java.io.IOException
public void flush() throws java.io.IOException
HttpServerConnection
flush
in interface HttpServerConnection
java.io.IOException
public void sendResponseHeader(HttpResponse response) throws HttpException, java.io.IOException
HttpServerConnection
sendResponseHeader
in interface HttpServerConnection
response
- the response whose headers to send.
HttpException
java.io.IOException
public void sendResponseEntity(HttpResponse response) throws HttpException, java.io.IOException
HttpServerConnection
sendResponseEntity
in interface HttpServerConnection
response
- the response whose entity to send.
HttpException
java.io.IOException
protected boolean isEof()
public boolean isStale()
HttpConnection
isStale
in interface HttpConnection
true
if attempts to use this connection are
likely to succeed, or false
if they are likely
to fail and this connection should be closedpublic HttpConnectionMetrics getMetrics()
HttpConnection
getMetrics
in interface HttpConnection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |