Class OAuthConnection

java.lang.Object
com.iland.core.web.sdk.connection.OAuthConnection

public class OAuthConnection extends Object
OAuthConnection.
Author:
Cory Snyder
  • Constructor Details

  • Method Details

    • getCoreClient

      public org.jboss.resteasy.client.jaxrs.ResteasyClient getCoreClient()
    • setDefaultMaxPerRoute

      public void setDefaultMaxPerRoute(int maxPerRoute)
    • setMaxPerRoute

      public void setMaxPerRoute(org.apache.http.conn.routing.HttpRoute route, int maxPerRoute)
    • setMaxTotal

      public void setMaxTotal(int max)
    • setConnectionTimeout

      public void setConnectionTimeout(int connectionTimeout)
    • setSoTimeout

      public void setSoTimeout(int soTimeout)
    • getResource

      public <T> T getResource(Class<T> type)
    • setHeader

      public void setHeader(String name, String value)
      Sets a header to send with each request to the iland API.
      Parameters:
      name - String the header key
      value - String the header value
    • setApiVersionForNextRequest

      public static void setApiVersionForNextRequest(Double version)
      Sets the API version used for the next request made on the same thread.
      Parameters:
      version - Double the version to use.
    • setApiVersion

      public static void setApiVersion(Double version)
      Sets the API version to be used for all requests.
      Parameters:
      version - Double version to use.
    • getAuthorizationToken

      public Optional<String> getAuthorizationToken()
      Get the authorization token.
      Returns:
      String authorization token
    • getApiHost

      public String getApiHost()
      Get the api host.
      Returns:
      String api host
    • login

      public void login(String username, String password) throws OAuthException
      Throws:
      OAuthException
    • logout

      public void logout()
    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object