Package com.codedx.api.client
Class CodeDxRepeatingClient
- java.lang.Object
-
- com.codedx.api.client.CodeDxClient
-
- com.codedx.api.client.CodeDxRepeatingClient
-
public class CodeDxRepeatingClient extends CodeDxClient
Created by samuelj on 3/27/15.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.codedx.api.client.CodeDxClient
CodeDxClient.CodeDxVersionResponse
-
-
Field Summary
-
Fields inherited from class com.codedx.api.client.CodeDxClient
httpClientBuilder, key, url
-
-
Constructor Summary
Constructors Constructor Description CodeDxRepeatingClient(CodeDxClient oldClient, PrintStream logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> TdoHttpRequest(org.apache.http.client.methods.HttpRequestBase request, String path, boolean isXApi, Type responseType, Object requestBody)Perform an HttpRequest to the given api path, with an optional request body, and parse the response-
Methods inherited from class com.codedx.api.client.CodeDxClient
buildBrowsableAnalysisRunUrl, buildLatestFindingsUrl, createProject, getCodeDxVersion, getFindingsCount, getFindingsGroupedCounts, getGitJobResult, getJob, getJobStatus, getProject, getProjectBranches, getProjectGitConfig, getProjects, projectPolicyShouldBreakTheBuild, setAnalysisName, startAnalysis
-
-
-
-
Constructor Detail
-
CodeDxRepeatingClient
public CodeDxRepeatingClient(CodeDxClient oldClient, PrintStream logger)
-
-
Method Detail
-
doHttpRequest
protected <T> T doHttpRequest(org.apache.http.client.methods.HttpRequestBase request, String path, boolean isXApi, Type responseType, Object requestBody) throws IOException, CodeDxClientExceptionDescription copied from class:CodeDxClientPerform an HttpRequest to the given api path, with an optional request body, and parse the response- Overrides:
doHttpRequestin classCodeDxClient- Type Parameters:
T- Type parameter that determines the parsed response type- Parameters:
request- Generally a new `HttpGet`, `HttpPost`, or `HttpPut`path- The relative API path (not including /x/ or /api/)isXApi- Flag that determines whether the request will prepend /x/ or /api/ to the path (true = /x/)responseType- A type instance that helps `gson` parse the response bodyrequestBody- An optional payload that will be converted to json and sent with the request- Returns:
- The parsed response
- Throws:
IOException- If the underlying IO goes wrongCodeDxClientException- For non 2xx response codes
-
-