public interface IHttpProvider
| Modifier and Type | Method and Description |
|---|---|
IConnectionConfig |
getConnectionConfig()
Get connection config for read and connect timeout in requests
|
<Result,BodyType> |
getHttpRequest(IHttpRequest request,
java.lang.Class<Result> resultClass,
BodyType serializable,
IProgressCallback<? super Result> progress)
Sends the HTTP request
|
ISerializer |
getSerializer()
Get the serializer for this HTTP provider
|
<Result,BodyType> |
send(IHttpRequest request,
java.lang.Class<Result> resultClass,
BodyType serializable)
Sends the HTTP request
|
<Result,BodyType,DeserializeType> |
send(IHttpRequest request,
java.lang.Class<Result> resultClass,
BodyType serializable,
IStatefulResponseHandler<Result,DeserializeType> handler)
Sends the HTTP request
|
<Result,BodyType> |
send(IHttpRequest request,
ICallback<? super Result> callback,
java.lang.Class<Result> resultClass,
BodyType serializable)
Sends the HTTP request asynchronously
|
void |
setConnectionConfig(IConnectionConfig connectionConfig)
Set connection config for read and connect timeout in requests
|
ISerializer getSerializer()
IConnectionConfig getConnectionConfig()
void setConnectionConfig(IConnectionConfig connectionConfig)
connectionConfig - Connection configuration to be used for timeout values<Result,BodyType> void send(IHttpRequest request, ICallback<? super Result> callback, java.lang.Class<Result> resultClass, BodyType serializable)
Result - the type of the response objectBodyType - the type of the object to send to the service in the body of the requestrequest - the request descriptioncallback - the callback to be called after success or failureresultClass - the class of the response from the serviceserializable - the object to send to the service in the body of the request<Result,BodyType> Result send(IHttpRequest request, java.lang.Class<Result> resultClass, BodyType serializable) throws ClientException
Result - the type of the response objectBodyType - the type of the object to send to the service in the body of the requestrequest - the request descriptionresultClass - the class of the response from the serviceserializable - the object to send to the service in the body of the requestClientException - this exception occurs if the request was unable to complete for any reason<Result,BodyType,DeserializeType> Result send(IHttpRequest request, java.lang.Class<Result> resultClass, BodyType serializable, IStatefulResponseHandler<Result,DeserializeType> handler) throws ClientException
Result - the expected return type returnBodyType - the type of the object to send to the service in the body of the requestDeserializeType - the type of the HTTP response objectrequest - the request descriptionresultClass - the class of the response from the serviceserializable - the object to send to the service in the body of the requesthandler - the handler for stateful responseClientException - this exception occurs if the request was unable to complete for any reason<Result,BodyType> okhttp3.Request getHttpRequest(IHttpRequest request, java.lang.Class<Result> resultClass, BodyType serializable, IProgressCallback<? super Result> progress) throws ClientException
Result - the type of the response objectBodyType - the type of the object to send to the service in the body of the requestrequest - the request descriptionresultClass - the class of the response from the serviceserializable - the object to send to the service in the body of the requestprogress - the progress callback for the requestClientException - an exception occurs if the request was unable to complete for any reason