com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class HttpProxy

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable, com.aspose.ms.System.Net.IWebProxy


    public class HttpProxy
    extends Proxy
    implements com.aspose.ms.System.Net.IWebProxy

    HTTP proxy client.

    • Constructor Detail

      • HttpProxy

        public HttpProxy(String address,
                 int port)

        Initializes a new instance of the HttpProxy class to connect to proxy server without authentication.

        Parameters:
        address - The domain name or IP address of the proxy
        port - The port number of the proxy
      • HttpProxy

        public 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.

        Parameters:
        address - The domain name or IP address of the proxy
        port - The port number of the proxy
        username - Username for authentication
        password - Password for authentication
    • Method Detail

      • getSupportedAuthenticationMethods

        public final byte getSupportedAuthenticationMethods()

        The supported authentication methods to connect to HTTP proxy

      • setSupportedAuthenticationMethods

        public final void setSupportedAuthenticationMethods(byte value)

        The supported authentication methods to connect to HTTP proxy

      • setUpStream

        public void setUpStream(com.aspose.ms.System.IO.Stream stream,
                       String address,
                       int port)

        Configures proxy-server to transport data to the target host.

        Parameters:
        stream - Stream which is connected to the proxy-server.
        address - The network address of the target host we want to contact
        port - The port number of the target host we want to contact
      • getCredentials

        public final com.aspose.ms.System.Net.ICredentials getCredentials()

        The credentials to submit to the proxy server for authentication.

        Specified by:
        getCredentials in interface com.aspose.ms.System.Net.IWebProxy
      • setCredentials

        public final void setCredentials(com.aspose.ms.System.Net.ICredentials value)

        The credentials to submit to the proxy server for authentication.

        Specified by:
        setCredentials in interface com.aspose.ms.System.Net.IWebProxy
      • isBypassed

        public boolean isBypassed(URI host)

        Indicates that the proxy should not be used for the specified host.

        Parameters:
        host - The System.Uri of the host to check for proxy use.
        Returns:
        true if the proxy server should not be used for host; otherwise, false.
      • getProxy

        public URI getProxy(URI destination)

        Returns the URI of a proxy.

        Parameters:
        destination - A System.Uri that specifies the requested Internet resource.
        Returns:
        A System.Uri instance that contains the URI of the proxy used to contact destination.
      • getProxy

        public com.aspose.ms.System.Uri getProxy(com.aspose.ms.System.Uri destination)
        Specified by:
        getProxy in interface com.aspose.ms.System.Net.IWebProxy
      • isBypassed

        public boolean isBypassed(com.aspose.ms.System.Uri host)
        Specified by:
        isBypassed in interface com.aspose.ms.System.Net.IWebProxy