Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion sdk/src/main/java/com/silanis/esl/sdk/EslClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,26 @@ public EslClient(String apiKey, String baseURL, String webpageURL, boolean allow
}

public EslClient(String apiKey, String baseURL, boolean allowAllSSLCertificates) {
this(apiKey, baseURL, allowAllSSLCertificates, null);
this(apiKey, baseURL, allowAllSSLCertificates, (ProxyConfiguration) null);
}

public EslClient(String apiKey, String baseURL, ProxyConfiguration proxyConfiguration) {
this(apiKey, baseURL, false, proxyConfiguration);
}

public EslClient(String apiKey, String baseURL, SocksConfiguration socksConfiguration) {
this(apiKey, baseURL, false, socksConfiguration);
}

public EslClient(String apiKey, String baseURL, boolean allowAllSSLCertificates, SocksConfiguration socksConfiguration) {
Asserts.notNullOrEmpty( apiKey, "apiKey" );
Asserts.notNullOrEmpty( baseURL, "baseURL" );
setBaseURL(baseURL);
setWebpageURL(baseURL);
RestClient client = new RestClient(apiKey, allowAllSSLCertificates, socksConfiguration);
init(client);
}

public EslClient(String apiKey, String baseURL, boolean allowAllSSLCertificates, ProxyConfiguration proxyConfiguration) {
Asserts.notNullOrEmpty( apiKey, "apiKey" );
Asserts.notNullOrEmpty( baseURL, "baseURL" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public void setHttpsHost(String httpsHost) {
public int getHttpsPort() {
return httpsPort;
}

public void setHttpsPort(int httpsPort) {
this.httpsPort = httpsPort;
}
Expand Down
58 changes: 58 additions & 0 deletions sdk/src/main/java/com/silanis/esl/sdk/SocksConfiguration.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package com.silanis.esl.sdk;

/**
* Created by rochbu on 05/12/14.
*/
public class SocksConfiguration {

private String socksHost;
private int socksPort;
private String userName;
private String password;
private boolean credentials;

public SocksConfiguration(){
socksHost = null;
socksPort = 0;
userName = null;
password = null;
credentials = false;
}

public String getSocksHost() {
return socksHost;
}

public void setSocksHost(String socksHost) {
this.socksHost = socksHost;
}

public int getSocksPort() {
return socksPort;
}

public void setSocksPort(int socksPort) {
this.socksPort = socksPort;
}

public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}

public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}

public boolean hasCredentials() {
return credentials;
}
public void setCredentials(boolean credentials) {
this.credentials = credentials;
}
}
Loading