Class GitLabApiProvider

java.lang.Object
org.nasdanika.models.gitlab.util.GitLabApiProvider
All Implemented Interfaces:
AutoCloseable

public class GitLabApiProvider extends Object implements AutoCloseable
This class takes care of different ways to create GitLabApi and request throttling
  • Constructor Details

    • GitLabApiProvider

      public GitLabApiProvider(String hostUrl, String accessToken)
    • GitLabApiProvider

      public GitLabApiProvider(org.gitlab4j.api.GitLabApi gitLabApi)
    • GitLabApiProvider

      public GitLabApiProvider(String hostUrl, String accessToken, long clientRateLimitWindow, int clientRateLimit)
      Parameters:
      clientRateLimitWindow - Client rate window in milliseconds. Client rate limit is enforced if this value and clientRateLimit are positive.
      clientRateLimit - Client rate limit per rate window. Client rate limit is enforced if this value and clientRateLimitWindow are positive.
    • GitLabApiProvider

      public GitLabApiProvider(org.gitlab4j.api.GitLabApi gitLabApi, long clientRateLimitWindow, int clientRateLimit)
      Parameters:
      clientRateLimitWindow - Client rate window in milliseconds. Client rate limit is enforced if this value and clientRateLimit are positive.
      clientRateLimit - Client rate limit per rate window. Client rate limit is enforced if this value and clientRateLimitWindow are positive.
    • GitLabApiProvider

      public GitLabApiProvider(org.gitlab4j.api.GitLabApi gitLabApi, Handler throttlingHandler)
  • Method Details

    • getGitLabApi

      public org.gitlab4j.api.GitLabApi getGitLabApi()
      Access to the API for configuration.
      Returns:
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable