]> source.dussan.org Git - sonarqube.git/commit
SONAR-8351 share OkHttpClient utilities
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 8 Nov 2016 14:34:18 +0000 (15:34 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 9 Nov 2016 19:48:20 +0000 (20:48 +0100)
commitf050424587272bb89868aded19c5b6225d235348
tree97f4a5f5ab6dcf0ec68d558c7e2be4f44b68da77
parent64bbc7c5078cd0b2ac4251d4a8a407247065ccea
SONAR-8351 share OkHttpClient utilities

sonar-ws correctly configures OkHttpClient for the
support of HTTPS, proxy (incl. authentication), timeouts and user agent.
This code should be reused by web server and compute engine, for
example when sending webhook payloads.

The new class OkHttpClientProvider allows web server/CE
to instantiate and configure a single instance of OkHttpClient.
server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
server/sonar-server/src/main/java/org/sonar/server/util/OkHttpClientProvider.java [new file with mode: 0644]
server/sonar-server/src/test/java/org/sonar/server/util/OkHttpClientProviderTest.java [new file with mode: 0644]
sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/BatchWsClientProviderTest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/HttpConnector.java
sonar-ws/src/main/java/org/sonarqube/ws/client/OkHttpClientBuilder.java [new file with mode: 0644]
sonar-ws/src/test/java/org/sonarqube/ws/client/HttpConnectorTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/OkHttpClientBuilderTest.java [new file with mode: 0644]