Package com.glideapi

Class GlideClient

java.lang.Object
com.glideapi.GlideClient

public class GlideClient extends Object
  • Field Details

  • Constructor Details

    • GlideClient

      public GlideClient(Types.GlideSdkSettings settings)
      Creates a GlideClient with automatic session management using ThreadLocal strategy
    • GlideClient

      public GlideClient(Types.GlideSdkSettings settings, boolean autoSession, GlideClient.SessionManagement strategy)
      Creates a GlideClient with specified session management
    • GlideClient

      public GlideClient(String clientId, String clientSecret)
    • GlideClient

      public GlideClient(String clientId, String clientSecret, boolean autoSession)
      Creates a GlideClient with manual session management (backward compatibility)
    • GlideClient

      public GlideClient()
  • Method Details

    • createSession

      public Types.Session createSession(String scope) throws Exception
      Creates a new OAuth session for API authentication with specified scopes.
      Parameters:
      scope - Space-separated list of scopes to request
      Returns:
      A new Session with an access token
      Throws:
      Exception - if session creation fails
    • createSession

      public Types.Session createSession() throws Exception
      Creates a new OAuth session for API authentication. This is a helper method - users can call this directly or implement their own session management. Requests all available scopes.
      Returns:
      A new Session with an access token
      Throws:
      Exception - if session creation fails
    • createSessionAsync

      public CompletableFuture<Types.Session> createSessionAsync()
      Creates a new session asynchronously
      Returns:
      CompletableFuture that will complete with a new Session
    • clearSessionCache

      public void clearSessionCache()
      Clear any cached sessions
    • getSessionStrategy

      public SessionStrategy getSessionStrategy()
      Get the current session strategy
    • isAutoSession

      public boolean isAutoSession()
      Check if automatic session management is enabled