public class HttpProxy extends Proxy implements com.aspose.ms.System.Net.IWebProxy
HTTP proxy client.
Constructor and Description |
---|
HttpProxy(String address,
int port)
Initializes a new instance of the
HttpProxy class to connect to proxy server without authentication. |
HttpProxy(String address,
int port,
String username,
String password)
Initializes a new instance of the
HttpProxy class to connect to proxy server with defined username and password. |
Modifier and Type | Method and Description |
---|---|
com.aspose.ms.System.Net.ICredentials |
getCredentials()
The credentials to submit to the proxy server for authentication.
|
com.aspose.ms.System.Uri |
getProxy(com.aspose.ms.System.Uri destination) |
URI |
getProxy(URI destination)
Returns the URI of a proxy.
|
byte |
getSupportedAuthenticationMethods()
The supported authentication methods to connect to HTTP proxy
|
boolean |
isBypassed(com.aspose.ms.System.Uri host) |
boolean |
isBypassed(URI host)
Indicates that the proxy should not be used for the specified host.
|
void |
setCredentials(com.aspose.ms.System.Net.ICredentials value)
The credentials to submit to the proxy server for authentication.
|
void |
setSupportedAuthenticationMethods(byte value)
The supported authentication methods to connect to HTTP proxy
|
void |
setUpStream(com.aspose.ms.System.IO.Stream stream,
String address,
int port)
Configures proxy-server to transport data to the target host.
|
dispose, getAddress, getPassword, getPort, getStream, getUsername, setAddress, setPassword, setPort, setUsername
public HttpProxy(String address, int port)
Initializes a new instance of the HttpProxy
class to connect to proxy server without authentication.
address
- The domain name or IP address of the proxyport
- The port number of the proxypublic HttpProxy(String address, int port, String username, String password)
Initializes a new instance of the HttpProxy
class to connect to proxy server with defined username and password.
address
- The domain name or IP address of the proxyport
- The port number of the proxyusername
- Username for authenticationpassword
- Password for authenticationpublic final byte getSupportedAuthenticationMethods()
The supported authentication methods to connect to HTTP proxy
public final void setSupportedAuthenticationMethods(byte value)
The supported authentication methods to connect to HTTP proxy
public void setUpStream(com.aspose.ms.System.IO.Stream stream, String address, int port)
Configures proxy-server to transport data to the target host.
stream
- Stream which is connected to the proxy-server.address
- The network address of the target host we want to contactport
- The port number of the target host we want to contactpublic final com.aspose.ms.System.Net.ICredentials getCredentials()
The credentials to submit to the proxy server for authentication.
getCredentials
in interface com.aspose.ms.System.Net.IWebProxy
public final void setCredentials(com.aspose.ms.System.Net.ICredentials value)
The credentials to submit to the proxy server for authentication.
setCredentials
in interface com.aspose.ms.System.Net.IWebProxy
public boolean isBypassed(URI host)
Indicates that the proxy should not be used for the specified host.
host
- The System.Uri of the host to check for proxy use.public URI getProxy(URI destination)
Returns the URI of a proxy.
destination
- A System.Uri that specifies the requested Internet resource.public com.aspose.ms.System.Uri getProxy(com.aspose.ms.System.Uri destination)
getProxy
in interface com.aspose.ms.System.Net.IWebProxy
public boolean isBypassed(com.aspose.ms.System.Uri host)
isBypassed
in interface com.aspose.ms.System.Net.IWebProxy