com.urswolfer.gerrit.client.rest.http.HttpClientBuilderExtension Java Examples

The following examples show how to use com.urswolfer.gerrit.client.rest.http.HttpClientBuilderExtension. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GerritApiBuilder.java    From gerrit-code-review-plugin with Apache License 2.0 6 votes vote down vote up
public GerritApi build() {
  GerritApi gerritApi = null;
  if (verifyParameters()) {
    List<HttpClientBuilderExtension> extensions = new ArrayList<>();
    extensions.add(UserAgentClientBuilderExtension.INSTANCE);
    if (Boolean.TRUE.equals(insecureHttps)) {
      extensions.add(SSLNoVerifyCertificateManagerClientBuilderExtension.INSTANCE);
    }
    gerritApi =
        new GerritRestApiFactory()
            .create(
                new GerritAuthData.Basic(gerritApiUrl.toString(), username, password, true),
                extensions.toArray(new HttpClientBuilderExtension[0]));
  }
  return gerritApi;
}
 
Example #2
Source File: GerritApiImpl.java    From gerrit-rest-java-client with Apache License 2.0 4 votes vote down vote up
public GerritApiImpl(GerritAuthData authData,
                     HttpRequestExecutor httpRequestExecutor,
                     HttpClientBuilderExtension... httpClientBuilderExtensions) {
    this.gerritRestClient = new GerritRestClient(authData, httpRequestExecutor, httpClientBuilderExtensions);
}
 
Example #3
Source File: GerritRestApiFactory.java    From gerrit-rest-java-client with Apache License 2.0 4 votes vote down vote up
public GerritRestApi create(GerritAuthData authData,
                        HttpClientBuilderExtension... httpClientBuilderExtensions) {
    return create(authData, new HttpRequestExecutor(), httpClientBuilderExtensions);
}
 
Example #4
Source File: GerritRestApiFactory.java    From gerrit-rest-java-client with Apache License 2.0 4 votes vote down vote up
public GerritRestApi create(GerritAuthData authData,
                        HttpRequestExecutor httpRequestExecutor,
                        HttpClientBuilderExtension... httpClientBuilderExtensions) {
    return new GerritApiImpl(authData, httpRequestExecutor, httpClientBuilderExtensions);
}