Class AbstractHttpClient
- java.lang.Object
-
- org.apache.druid.java.util.http.client.AbstractHttpClient
-
- All Implemented Interfaces:
HttpClient
- Direct Known Subclasses:
CredentialedHttpClient
,NettyHttpClient
public abstract class AbstractHttpClient extends Object implements HttpClient
-
-
Constructor Summary
Constructors Constructor Description AbstractHttpClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <Intermediate,Final>
com.google.common.util.concurrent.ListenableFuture<Final>go(Request request, HttpResponseHandler<Intermediate,Final> handler)
Submit a request and process the response with the given response handler.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.java.util.http.client.HttpClient
go
-
-
-
-
Method Detail
-
go
public <Intermediate,Final> com.google.common.util.concurrent.ListenableFuture<Final> go(Request request, HttpResponseHandler<Intermediate,Final> handler)
Description copied from interface:HttpClient
Submit a request and process the response with the given response handler.Note that the Request object passed in to the HttpClient *may* be mutated by the actual client. This is largely done by composed clients, but the contract is that mutation is possible. It is the caller's responsibility to pass in a copy of the Request object if they want to have an object that is not mutated.
- Specified by:
go
in interfaceHttpClient
- Type Parameters:
Intermediate
- The type of the intermediate results from the handlerFinal
- The type of the final results that the returned ListenableFuture will contain- Parameters:
request
- Request to process, this *may* be mutated by the clienthandler
- An asynchronous response handler that will be used to process results from the http call- Returns:
- A listenable future that will eventually provide an object of type Final
-
-