|
Awake SQL v1.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.awakefw.commons.api.client.HttpProxy
public final class HttpProxy
Allows to define a proxy with or without authentication. All is done through constructor, because instance should be immutable:
String url = "https://www.acme.org/AwakeFileManager"; String username = "myUsername"; char[] password = { 'm', 'y', 'P', 'a', 's', 's', 'w', 'o', 'r', 'd' }; HttpProxy httpProxy = null; // Constructor to use if http proxy is without authentication: httpProxy = new HttpProxy("myProxyhost", 8080); // Constructor to use if http proxy requires authentication: httpProxy = new HttpProxy("myProxyhost", 8080, "username", "password"); // Constructor to use if http proxy is a NTLM proxy: httpProxy = new HttpProxy("myProxyhost", 8080, "username", "password", "myWorkstation", "myDomain"); // Open an Awake File Session through a proxy: AwakeFileSession awakeFileSession = new AwakeFileSession(url, username, password, httpProxy); // Etc.
Constructor Summary | |
---|---|
HttpProxy(String address,
int port)
Constructor to use to define a proxy that does not requires authentication. |
|
HttpProxy(String address,
int port,
String username,
String password)
Constructor to use to define a proxy that requires authentication |
|
HttpProxy(String address,
int port,
String username,
String password,
String workstation,
String domain)
Constructor to use to define a Microsoft NTLM proxy that requires authentication. |
Method Summary | |
---|---|
String |
getAddress()
Returns the address of the proxy. |
String |
getDomain()
Returns the NTLM domain parameter. |
String |
getPassword()
Returns the password. |
int |
getPort()
Returns the port of the proxy. |
String |
getUsername()
Returns the username required for authentication. |
String |
getWorkstation()
Returns the NTLM workstation parameter. |
String |
toString()
Returns a clean representation of the HttpProxy instance. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HttpProxy(String address, int port)
address
- the proxy addressport
- the proxy port
IllegalArgumentException
- if address is nullpublic HttpProxy(String address, int port, String username, String password)
address
- the proxy addressport
- the proxy portusername
- the username required for authenticationpassword
- the password for authentication (maybe null if no password is
required)
IllegalArgumentException
- if address or username is nullpublic HttpProxy(String address, int port, String username, String password, String workstation, String domain)
address
- the NTLM proxy addressport
- the NTLM proxy portusername
- the username required for authenticationpassword
- the password for authentication (maybe null if no password is
required)workstation
- the NTLM workstation parameterdomain
- the NTLM domain parameter
IllegalArgumentException
- if address or username is nullMethod Detail |
---|
public String getAddress()
public String getDomain()
public String getPassword()
null
if no authentication is required or if no
password is required for authentication).
public int getPort()
public String getUsername()
null
if no
authentication is required).
public String getWorkstation()
public String toString()
HttpProxy
instance.
toString
in class Object
HttpProxy
instance
|
Awake SQL v1.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |