Package io.ably.lib.http
Class HttpCore
java.lang.Object
io.ably.lib.http.HttpCore
HttpCore performs authenticated HTTP synchronously. Internal; use Http or HttpScheduler instead.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Exception signifying that an httpCore request failed with a WWW-Authenticate responsestatic interface
Interface for an entity that performs type-specific processing on an httpCore response bodystatic interface
Interface for an entity that supplies an httpCore request bodystatic class
A type encapsulating an httpCore responsestatic interface
Interface for an entity that performs type-specific processing on an httpCore response -
Field Summary
-
Constructor Summary
ConstructorDescriptionHttpCore
(ClientOptions options, Auth auth, PlatformAgentProvider platformAgentProvider) Public API -
Method Summary
Modifier and TypeMethodDescriptionGets host for this HTTP clientGets host for this HTTP client<T> T
httpExecute
(URL url, 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
(URL url, 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-Authenticatevoid
setPreferredHost
(String host) Sets host for this HTTP client
-
Field Details
-
scheme
-
port
public final int port
-
-
Constructor Details
-
HttpCore
public HttpCore(ClientOptions options, Auth auth, PlatformAgentProvider platformAgentProvider) throws AblyException Public API- Throws:
AblyException
-
-
Method Details
-
httpExecuteWithRetry
public <T> T httpExecuteWithRetry(URL url, String method, Param[] headers, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth) throws AblyException Make a synchronous HTTP request specified by URL and proxy, retrying if necessary on WWW-Authenticate- Parameters:
-
url
- -
method
- -
headers
- -
requestBody
- -
responseHandler
- - Returns:
- Throws:
AblyException
-
getPreferredHost
Gets host for this HTTP client- Returns:
-
setPreferredHost
Sets host for this HTTP client- Parameters:
-
host
- URL string
-
getPrimaryHost
Gets host for this HTTP client- Returns:
-
httpExecute
public <T> T httpExecute(URL url, String method, Param[] headers, HttpCore.RequestBody requestBody, boolean withCredentials, HttpCore.ResponseHandler<T> responseHandler) throws AblyException Make a synchronous HTTP request specified by URL and proxy- Parameters:
-
url
- -
method
- -
headers
- -
requestBody
- -
withCredentials
- -
responseHandler
- - Returns:
- Throws:
AblyException
-