-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public class HttpScheduler implements AutoCloseable
HttpScheduler schedules HttpCore operations to an Executor, exposing a generic async API. Internal; use Http instead.
-
-
Method Summary
Modifier and Type Method Description <T> Future<T>get(String path, Array<Param> headers, Array<Param> params, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)Async HTTP GET for Ably host, with fallbacks <T> Future<T>put(String path, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)Async HTTP PUT for Ably host, with fallbacks <T> Future<T>post(String path, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)Async HTTP POST for Ably host, with fallbacks <T> Future<T>patch(String path, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)Async HTTP PATCH for Ably host, with fallbacks <T> Future<T>del(String path, Array<Param> headers, Array<Param> params, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)Async HTTP DEL for Ably host, with fallbacks <T> Future<T>exec(String path, String method, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)Async HTTP request for Ably host, with fallbacks voidclose()<T> Future<T>httpExecute(URL url, String method, Array<Param> headers, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, Callback<T> callback)Make an asynchronous HTTP request to a given URL <T> Future<T>ablyHttpExecuteWithFallback(String path, String method, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)Make an asynchronous HTTP request to an Ably endpoint, using the Ably auth credentials and fallback hosts if necessary <T> Future<T>ablyHttpExecuteWithRetry(String host, String path, String method, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)Make an asynchronous HTTP request to an Ably endpoint, using the Ably auth credentials and reauthentication if necessary voidexecute(Runnable runnable)Adds a Runnable to the Executor used by this scheduler instance. -
-
Method Detail
-
get
<T> Future<T> get(String path, Array<Param> headers, Array<Param> params, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)
Async HTTP GET for Ably host, with fallbacks
-
put
<T> Future<T> put(String path, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)
Async HTTP PUT for Ably host, with fallbacks
-
post
<T> Future<T> post(String path, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)
Async HTTP POST for Ably host, with fallbacks
-
patch
<T> Future<T> patch(String path, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)
Async HTTP PATCH for Ably host, with fallbacks
-
del
<T> Future<T> del(String path, Array<Param> headers, Array<Param> params, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)
Async HTTP DEL for Ably host, with fallbacks
-
exec
<T> Future<T> exec(String path, String method, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)
Async HTTP request for Ably host, with fallbacks
-
close
void close()
-
httpExecute
<T> Future<T> httpExecute(URL url, String method, Array<Param> headers, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, Callback<T> callback)
Make an asynchronous HTTP request to a given URL
-
ablyHttpExecuteWithFallback
<T> Future<T> ablyHttpExecuteWithFallback(String path, String method, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)
Make an asynchronous HTTP request to an Ably endpoint, using the Ably auth credentials and fallback hosts if necessary
-
ablyHttpExecuteWithRetry
<T> Future<T> ablyHttpExecuteWithRetry(String host, String path, String method, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth, Callback<T> callback)
Make an asynchronous HTTP request to an Ably endpoint, using the Ably auth credentials and reauthentication if necessary
-
-
-
-