public abstract class AbsClientRequestConsumer extends Object implements org.apache.http.nio.protocol.HttpAsyncRequestConsumer<ResponseProducer>
Modifier and Type | Field and Description |
---|---|
protected BufferIOController |
buffer |
protected org.apache.http.protocol.HttpContext |
context |
protected static org.slf4j.Logger |
Logger |
protected ResponseProducer |
producer |
Modifier | Constructor and Description |
---|---|
protected |
AbsClientRequestConsumer(org.apache.http.protocol.HttpContext context,
BufferIOController buffer,
ResponseProducer producer)
Primary constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close()
This specialization currently does nothing.
|
void |
consumeContent(org.apache.http.nio.ContentDecoder decoder,
org.apache.http.nio.IOControl ioctrl)
This method is only called if the request had content (e.g.
|
void |
failed(Exception exception) |
Exception |
getException() |
ResponseProducer |
getResult()
Returns the
ResponseProducer that will ultimately send the result of this request/response transaction back to the client. |
boolean |
isDone() |
void |
requestCompleted(org.apache.http.protocol.HttpContext context)
Invoked once the request has been fully received by this server.
|
protected static final org.slf4j.Logger Logger
protected final org.apache.http.protocol.HttpContext context
protected final BufferIOController buffer
protected volatile ResponseProducer producer
protected AbsClientRequestConsumer(org.apache.http.protocol.HttpContext context, BufferIOController buffer, ResponseProducer producer)
context
- The context of this http transaction.buffer
- An asynchronous friendly buffer to hold any incoming request contentproducer
- The ResponseProducer that is responsible for handling our response back to the requesting client.public void consumeContent(org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl ioctrl) throws IOException
consumeContent
in interface org.apache.http.nio.protocol.HttpAsyncRequestConsumer<ResponseProducer>
IOException
public void requestCompleted(org.apache.http.protocol.HttpContext context)
requestCompleted
in interface org.apache.http.nio.protocol.HttpAsyncRequestConsumer<ResponseProducer>
public ResponseProducer getResult()
ResponseProducer
that will ultimately send the result of this request/response transaction back to the client.getResult
in interface org.apache.http.nio.protocol.HttpAsyncRequestConsumer<ResponseProducer>
public boolean isDone()
isDone
in interface org.apache.http.nio.protocol.HttpAsyncRequestConsumer<ResponseProducer>
public Exception getException()
getException
in interface org.apache.http.nio.protocol.HttpAsyncRequestConsumer<ResponseProducer>
public void failed(Exception exception)
failed
in interface org.apache.http.nio.protocol.HttpAsyncRequestConsumer<ResponseProducer>
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2015–2024 Frank Stock. All rights reserved.