com.synopsys.integration.blackduck.http.client.BlackDuckHttpClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of blackduck-common Show documentation
Show all versions of blackduck-common Show documentation
A library for using various capabilities of Black Duck, notably the REST API and signature scanning.
/*
* blackduck-common
*
* Copyright (c) 2021 Synopsys, Inc.
*
* Use subject to the terms and conditions of the Synopsys End User Software License and Maintenance Agreement. All rights reserved worldwide.
*/
package com.synopsys.integration.blackduck.http.client;
import java.util.Optional;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.impl.client.HttpClientBuilder;
import com.google.gson.Gson;
import com.synopsys.integration.blackduck.api.core.BlackDuckResponse;
import com.synopsys.integration.blackduck.api.core.response.UrlResponse;
import com.synopsys.integration.blackduck.service.request.BlackDuckRequest;
import com.synopsys.integration.exception.IntegrationException;
import com.synopsys.integration.log.IntLogger;
import com.synopsys.integration.rest.HttpUrl;
import com.synopsys.integration.rest.proxy.ProxyInfo;
import com.synopsys.integration.rest.response.ErrorResponse;
import com.synopsys.integration.rest.response.Response;
public interface BlackDuckHttpClient {
> Response execute(BlackDuckRequest blackDuckRequest) throws IntegrationException;
Response attemptAuthentication() throws IntegrationException;
boolean isAlreadyAuthenticated(HttpUriRequest request);
Optional extractErrorResponse(String responseContent);
void handleErrorResponse(HttpUriRequest request, Response response);
void throwExceptionForError(Response response) throws IntegrationException;
HttpUrl getBlackDuckUrl();
String getUserAgentString();
HttpClientBuilder getHttpClientBuilder();
int getTimeoutInSeconds();
boolean isAlwaysTrustServerCertificate();
ProxyInfo getProxyInfo();
IntLogger getLogger();
Gson getGson();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy