Class RestExecutor
java.lang.Object
com.atlassian.crowd.integration.rest.service.RestExecutor
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
BasicAuthRestExecutor
This class provides primitive building blocks for using a REST API.
-
Constructor Summary
ConstructorDescriptionRestExecutor
(String baseUrl, org.apache.http.HttpHost httpHost, org.apache.http.client.CredentialsProvider credsProvider, org.apache.http.impl.client.CloseableHttpClient client) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected static String
createBaseUrl
(String url) Returns the "root" WebResource.protected static org.apache.http.client.CredentialsProvider
createCredentialsProvider
(ClientProperties clientProperties) protected static org.apache.http.HttpHost
createHttpHost
(ClientProperties clientProperties) protected final com.atlassian.crowd.integration.rest.service.RestExecutor.MethodExecutor
createMethodExecutor
(org.apache.http.client.methods.HttpUriRequest request) protected com.atlassian.crowd.integration.rest.service.RestExecutor.MethodExecutor
createMethodExecutor
(org.apache.http.client.methods.HttpUriRequest request, Set<Integer> statusCodesWithoutErrorEntity)
-
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
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
createBaseUrl
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
-
createMethodExecutor
protected final com.atlassian.crowd.integration.rest.service.RestExecutor.MethodExecutor createMethodExecutor(org.apache.http.client.methods.HttpUriRequest request)
-