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
Nested ClassesModifier and TypeClassDescriptionstatic classException signifying that an httpCore request failed with a WWW-Authenticate responsestatic interfaceInterface for an entity that performs type-specific processing on an httpCore response bodystatic interfaceInterface for an entity that supplies an httpCore request bodystatic classA type encapsulating an httpCore responsestatic interfaceInterface for an entity that performs type-specific processing on an httpCore response -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHttpCore(ClientOptions options, Auth auth, PlatformAgentProvider platformAgentProvider) Public API -
Method Summary
Modifier and TypeMethodDescriptionGets host for this HTTP clientGets host for this HTTP client<T> ThttpExecute(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> ThttpExecuteWithRetry(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-AuthenticateinjectDynamicAgents(Map<String, String> wrapperSDKAgents) [Internal Method]voidsetPreferredHost(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
-
injectDynamicAgents
[Internal Method]We use this method to implement proxy Realtime / Rest clients that add additional agents to the underlying client.
-