use of com.atlassian.jira.rest.client.internal.async.AtlassianHttpClientDecorator in project jira-plugin by jenkinsci.
the class JiraSite method createClient.
private static DisposableHttpClient createClient(final URI serverUri, final AuthenticationHandler authenticationHandler, HttpClientOptions options) {
final DefaultHttpClientFactory defaultHttpClientFactory = new DefaultHttpClientFactory(new NoOpEventPublisher(), new RestClientApplicationProperties(serverUri), new ThreadLocalContextManager() {
@Override
public Object getThreadLocalContext() {
return null;
}
@Override
public void setThreadLocalContext(Object context) {
}
@Override
public void clearThreadLocalContext() {
}
});
final HttpClient httpClient = defaultHttpClientFactory.create(options);
return new AtlassianHttpClientDecorator(httpClient, authenticationHandler) {
@Override
public void destroy() throws Exception {
defaultHttpClientFactory.dispose(httpClient);
}
};
}
Aggregations