Skip to content

Commit

Permalink
Merge pull request #302 from dellgreen/dpg/refactor/301/httpclientint…
Browse files Browse the repository at this point in the history
…erface

Fixed #301 Decoupled JenkinsServer and JenkinsHttpClient
  • Loading branch information
khmarbaise authored Dec 8, 2017
2 parents f9ed73c + bf35f47 commit 8ba1e60
Show file tree
Hide file tree
Showing 8 changed files with 344 additions and 149 deletions.
7 changes: 7 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
## Release 0.3.8 (NOT RELEASED YET)


* [Fixed Issue 301][issue-301]

Decoupled JenkinsServer and JenkinsHttpClient by extracting JenkinsHttpClient
methods into public interface so that different implementations can be plugged
into JenkinsServer if required


* [Fixed Issue 298][issue-298]

Added Closeable support to JenkinsServer and JenkinsHttpClient so that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.offbytwo.jenkins.client.JenkinsHttpClient;
import com.offbytwo.jenkins.client.JenkinsHttpConnection;
import com.offbytwo.jenkins.client.util.EncodingUtils;
import com.offbytwo.jenkins.client.util.UrlUtils;
import com.offbytwo.jenkins.helper.JenkinsVersion;
Expand All @@ -51,7 +52,10 @@
public class JenkinsServer implements Closeable {
private final Logger LOGGER = LoggerFactory.getLogger(getClass());

private final JenkinsHttpClient client;
/**
* The transport client instance to use.
*/
private final JenkinsHttpConnection client;

/**
* Create a new Jenkins server reference given only the server address
Expand Down Expand Up @@ -80,7 +84,7 @@ public JenkinsServer(URI serverUri, String username, String passwordOrToken) {
*
* @param client Specialized client to use.
*/
public JenkinsServer(JenkinsHttpClient client) {
public JenkinsServer(final JenkinsHttpConnection client) {
this.client = client;
}

Expand Down
Loading

0 comments on commit 8ba1e60

Please sign in to comment.