|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
HttpContent
in order to build a Response
AsyncHttpProvider
AsyncHttpProvider
RequestFilter
that will be invoked before AsyncHttpClient.executeRequest(Request)
ResponseFilter
that will be invoked as soon as the response is
received, and before AsyncHandler.onStatusReceived(HttpResponseStatus)
.
TransferListener
AsyncHandler
augmented with an AsyncCompletionHandler.onCompleted(Response)
convenience method which gets called
when the Response
has been fully received.AsyncHandler
of type Response
NOTE: Sending another asynchronous request from an AsyncHandler
must be done using
another thread to avoid potential deadlock inside the AsyncHttpProvider
The recommended way is to use the ExecutorService
from the AsyncHttpClientConfig
:
@Override
public Response onCompleted(Response response) throws Exception
{
asyncHttpClient.getConfig().executorService().execute(new Runnable()
{
public void run()
{
asyncHttpClient.prepareGet(...);
}
});
return response;
}
AsyncHttpClientConfig
configuration.
AsyncHttpProvider
and
the default AsyncHttpClientConfig
configuration.
AsyncHttpClientConfig
configuration and the
AsyncHttpClient.DEFAULT_PROVIDER
AsyncHttpClientConfig
configuration and
and a AsyncHttpProvider
.
AsyncHttpClientConfig
configuration and
and a AsyncHttpProvider class' name.
AsyncHttpClient
.AsyncHttpClient
AsyncHttpProvider
proprietary configurable properties.AsyncHttpProvider
common utilities.AsyncHttpClientConfig
Realm
Response
instance
RequestBuilder.build()
method is called.
Future
cannot be recovered.
AsyncHttpProvider
for caching http connections.FileInputStream
for the current filename.
AsyncHandler
Callable
and if there is no exception, mark this Future as done and release the internal lock.
AsyncHandler
when the response arrive.
ExecutorService
an AsyncHttpClient
use for handling
asynchronous response.
AsyncHttpProvider
will invoke RequestFilter.filter(com.ning.http.client.filter.FilterContext)
and will use the
returned FilterContext.getRequest()
and FilterContext.getAsyncHandler()
to continue the request
processing.
AsyncHttpProvider
will invoke ResponseFilter.filter(com.ning.http.client.filter.FilterContext)
and will use the
returned FilterContext.replayRequest()
and FilterContext.getAsyncHandler()
to decide if the response
processing can continue.
FilterContext
can be used to decorate Request
and AsyncHandler
from a list of RequestFilter
.FilterContext
FilterContext
FilterContext
AsyncHandler
to interrupt invocation of
the RequestFilter
and ResponseFilter
.String -> List<String>
map that adds a fluent interface, i.e.String -> List<String>
map that adds a fluent interface, i.e.Future
ConnectionsPool
support enabled.
AsyncHandler
AsyncHttpProviderConfig
ByteBuffer
Part.getPartBoundary()
AsyncHttpClientConfig
ConnectionsPool
AsyncHttpClient
can wait when connecting to a remote host
Cookie
.
File
to upload.
List
of the response header value.
AsyncHttpClient
can stay idle.
AsyncHttpClientConfig.getAllowPoolingConnection()
AsyncHttpClient
can handle.
AsyncHttpClient
can handle.
Part
AsyncHttpProvider
ProxyServer
used by an AsyncHttpClient
ProxyServer
Realm
}
Realm
Request
RequestFilter
AsyncHttpClient
wait for a response
ResponseFilter
HttpResponseStatus
SSLContext
used for SSL connection.
SSLEngineFactory
used for SSL connection.
URI
.
AsyncHandler
.
AsyncHandler
.
AsyncHandler
.
AsyncHandler
.
AsyncHandler
It will return false if the
either AsyncHandler.onStatusReceived(HttpResponseStatus)
or AsyncHandler.onHeadersReceived(HttpResponseHeaders)
returned AsyncHandler.STATE.ABORT
AsyncHandler
It will return false if the
either AsyncHandler.onStatusReceived(HttpResponseStatus)
or AsyncHandler.onHeadersReceived(HttpResponseHeaders)
returned AsyncHandler.STATE.ABORT
AsyncHandler
It will return false if the
either AsyncHandler.onStatusReceived(HttpResponseStatus)
or AsyncHandler.onHeadersReceived(HttpResponseHeaders)
returned AsyncHandler.STATE.ABORT
AsyncHandler
It will return false if the
either AsyncHandler.onStatusReceived(HttpResponseStatus)
or AsyncHandler.onHeadersReceived(HttpResponseHeaders)
returned AsyncHandler.STATE.ABORT
AsyncHandler
AsyncHandler
AsyncHandler
AsyncHandler
AsyncHandler
true
if all parts are repeatable, false
otherwise.
RequestEntity.writeRequest(java.io.OutputStream)
can be called more than once.
AsyncHttpClientConfig.getMaxRedirects()
has been reached.Response
API.ConnectionsPool
based on a ConcurrentHashMap
Future
that can be used to track when an asynchronous HTTP request has been fully processed.SSLEngine
.
File
, String
or FileInputStream
has been fully
written on the I/O socket.
File
, String
or FileInputStream
has been fully
written on the I/O socket.
File
, String
or FileInputStream
has been fully
written on the I/O socket.
Request
body as been progressed.
Request
body as been progressed.
Request
body wasn't fully written in a single I/O write
operation.
File
, String
or FileInputStream
has been fully
written on the I/O socket.
File
, String
or FileInputStream
has been fully
written on the I/O socket.
File
, String
or FileInputStream
has been fully
written on the I/O socket.
AsyncHttpClient.BoundRequestBuilder
using a Request
Response
AsyncHandler
with two extra callback who get invoked during the content upload to a remote server.Realm
ScheduledExecutorService
used to expire idle connections.
TransferListener
RequestFilter
that will be invoked before AsyncHttpClient.executeRequest(Request)
ResponseFilter
that will be invoked as soon as the response is
received, and before AsyncHandler.onStatusReceived(HttpResponseStatus)
.
Request
be executed.
Request r = new RequestBuilder().setUrl("url)
.setRealm((new Realm.RealmBuilder()).setPrincipal(user)
.setPassword(admin)
.setRealmName("MyRealm")
.setScheme(Realm.AuthScheme.DIGEST).build());
r.execute();
Request
.Request
AsyncCompletionHandler
ConnectionsPool
.
AsyncHttpProviderConfig
ConnectionsPool
AsyncHttpClient
can wait when connecting to a remote host
ExecutorService
an AsyncHttpClient
use for handling
asynchronous response.
AsyncHttpClient
can stay idle.
AsyncHttpClientConfig.Builder.setAllowPoolingConnection(boolean)
AsyncHttpClient
can handle.
AsyncHttpClient
can handle.
ProxyServer
used by an AsyncHttpClient
Realm
that will be used for all requests.
AsyncHttpClient
wait for a response
ScheduledExecutorService
used to expire idle connections.
SSLContext
for secure connection.
SSLEngineFactory
for secure connection.
RequestBuilder
so that signature calculation and inclusion can
be added as a pluggable component.SSLEngine
to be used for a single SSL connection.RequestFilter
throttles requests and block when the number of permits is reached, waiting for
the response to arrives before executing the next request.TransferCompletionHandler.TransferAdapter
with this listener.
AsyncHandler
that can be used to notify a set of TransferListener
AsyncHttpClient client = new AsyncHttpClient();
TransferCompletionHandler tl = new TransferCompletionHandler();
tl.addTransferListener(new TransferListener() {
public void onRequestHeadersSent(FluentCaseInsensitiveStringsMap headers) {
}
public void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers) {
}
public void onBytesReceived(ByteBuffer buffer) {
}
public void onBytesSent(ByteBuffer buffer) {
}
public void onRequestResponseCompleted() {
}
public void onThrowable(Throwable t) {
}
});
Response response = httpClient.prepareGet("http://...").execute(tl).get();
Response.getResponseBody()
get called.
ByteBuffer
AsyncHandler
that add support for WebDav's response manipulation.Response
which add support for getting the response's body as an XML document (@link WebDavResponse#getBodyAsXML}OutputStream
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |