public class HttpCore
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpCore.AuthRequiredException
Exception signifying that an httpCore request failed with a WWW-Authenticate response
|
static interface |
HttpCore.BodyHandler<T>
Interface for an entity that performs type-specific processing on an httpCore response body
|
static interface |
HttpCore.RequestBody
Interface for an entity that supplies an httpCore request body
|
static class |
HttpCore.Response
A type encapsulating an httpCore response
|
static interface |
HttpCore.ResponseHandler<T>
Interface for an entity that performs type-specific processing on an httpCore response
|
| Constructor and Description |
|---|
HttpCore(ClientOptions options,
Auth auth,
PlatformAgentProvider platformAgentProvider)
Public API
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getPreferredHost()
Gets host for this HTTP client
|
java.lang.String |
getPrimaryHost()
Gets host for this HTTP client
|
<T> T |
httpExecute(java.net.URL url,
java.net.Proxy proxy,
java.lang.String method,
Param[] headers,
HttpCore.RequestBody requestBody,
boolean withCredentials,
HttpCore.ResponseHandler<T> responseHandler)
Make a synchronous HTTP request specified by URL and proxy
|
<T> T |
httpExecuteWithRetry(java.net.URL url,
java.lang.String method,
Param[] headers,
HttpCore.RequestBody requestBody,
HttpCore.ResponseHandler<T> responseHandler,
boolean requireAblyAuth)
Make a synchronous HTTP request specified by URL and proxy, retrying if necessary on WWW-Authenticate
|
void |
setPreferredHost(java.lang.String host)
Sets host for this HTTP client
|
public HttpCore(ClientOptions options, Auth auth, PlatformAgentProvider platformAgentProvider) throws AblyException
AblyExceptionpublic <T> T httpExecuteWithRetry(java.net.URL url,
java.lang.String method,
Param[] headers,
HttpCore.RequestBody requestBody,
HttpCore.ResponseHandler<T> responseHandler,
boolean requireAblyAuth)
throws AblyException
url - method - headers - requestBody - responseHandler - AblyExceptionpublic void setPreferredHost(java.lang.String host)
host - URL stringpublic java.lang.String getPreferredHost()
public java.lang.String getPrimaryHost()
public <T> T httpExecute(java.net.URL url,
java.net.Proxy proxy,
java.lang.String method,
Param[] headers,
HttpCore.RequestBody requestBody,
boolean withCredentials,
HttpCore.ResponseHandler<T> responseHandler)
throws AblyException
url - proxy - method - headers - requestBody - withCredentials - responseHandler - AblyException