Class RestExecutor

java.lang.Object
com.atlassian.crowd.integration.rest.service.RestExecutor
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
BasicAuthRestExecutor

public abstract class RestExecutor extends Object implements Closeable
This class provides primitive building blocks for using a REST API.
  • Constructor Details

    • RestExecutor

      public RestExecutor(String baseUrl, org.apache.http.HttpHost httpHost, org.apache.http.client.CredentialsProvider credsProvider, org.apache.http.impl.client.CloseableHttpClient client)
  • Method Details

    • createCredentialsProvider

      protected static org.apache.http.client.CredentialsProvider createCredentialsProvider(ClientProperties clientProperties)
    • createHttpHost

      protected static org.apache.http.HttpHost createHttpHost(ClientProperties clientProperties)
    • close

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

      protected static String createBaseUrl(String url)
      Returns the "root" WebResource. This is the resource that's at the / of the crowd-rest-plugin plugin namespace.
      Parameters:
      url - URL to derive the base URL from
      Returns:
      base URL
    • createMethodExecutor

      protected com.atlassian.crowd.integration.rest.service.RestExecutor.MethodExecutor createMethodExecutor(org.apache.http.client.methods.HttpUriRequest request, Set<Integer> statusCodesWithoutErrorEntity)
    • createMethodExecutor

      protected final com.atlassian.crowd.integration.rest.service.RestExecutor.MethodExecutor createMethodExecutor(org.apache.http.client.methods.HttpUriRequest request)