Class HttpCore

java.lang.Object
io.ably.lib.http.HttpCore

public class HttpCore
extends java.lang.Object
HttpCore performs authenticated HTTP synchronously. Internal; use Http or HttpScheduler instead.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class 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
  • Field Summary

    Fields 
    Modifier and Type Field Description
    int port  
    java.lang.String scheme  
  • Constructor Summary

    Constructors 
    Constructor Description
    HttpCore​(ClientOptions options, Auth auth, PlatformAgentProvider platformAgentProvider)
    Public API
  • Method Summary

    Modifier and Type Method 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait