Class AbstractBitbucketApi

java.lang.Object
com.cloudbees.jenkins.plugins.bitbucket.impl.client.AbstractBitbucketApi
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
BitbucketCloudApiClient, BitbucketServerAPIClient

@Restricted(org.kohsuke.accmod.restrictions.ProtectedExternally.class) public abstract class AbstractBitbucketApi extends Object implements AutoCloseable
  • Field Details

    • logger

      protected final Logger logger
  • Constructor Details

  • Method Details

    • buildResponseException

      protected BitbucketRequestException buildResponseException(org.apache.hc.core5.http.ClassicHttpResponse response, String errorMessage)
    • getResponseContent

      protected String getResponseContent(org.apache.hc.core5.http.ClassicHttpResponse response) throws IOException
      Throws:
      IOException
    • connectionManagerBuilder

      protected static org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder connectionManagerBuilder()
    • setupClientBuilder

      protected org.apache.hc.client5.http.impl.classic.HttpClientBuilder setupClientBuilder()
    • setClientProxyParams

      protected void setClientProxyParams(org.apache.hc.client5.http.impl.classic.HttpClientBuilder builder)
    • getConnectionManager

      @CheckForNull protected abstract org.apache.hc.client5.http.io.HttpClientConnectionManager getConnectionManager()
    • getHost

      @NonNull protected abstract org.apache.hc.core5.http.HttpHost getHost()
    • getClient

      @NonNull protected abstract org.apache.hc.client5.http.impl.classic.CloseableHttpClient getClient()
    • executeMethod

      protected org.apache.hc.core5.http.ClassicHttpResponse executeMethod(org.apache.hc.client5.http.classic.methods.HttpUriRequest request) throws IOException
      Throws:
      IOException
    • getRequestAsInputStream

      protected InputStream getRequestAsInputStream(String path) throws IOException
      Throws:
      IOException
    • headRequestStatus

      protected int headRequestStatus(String path) throws IOException
      Throws:
      IOException
    • getRequest

      protected String getRequest(String path) throws IOException
      Throws:
      IOException
    • postRequest

      protected String postRequest(String path, List<? extends org.apache.hc.core5.http.NameValuePair> params) throws IOException
      Throws:
      IOException
    • postRequest

      protected String postRequest(String path, String content) throws IOException
      Throws:
      IOException
    • putRequest

      protected String putRequest(String path, String content) throws IOException
      Throws:
      IOException
    • deleteRequest

      protected String deleteRequest(String path) throws IOException
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException
    • getAuthenticator

      protected BitbucketAuthenticator getAuthenticator()