com.webrenderer
Class ProxySetting

java.lang.Object
  extended bycom.webrenderer.ProxySetting

public class ProxySetting
extends java.lang.Object

This holds the proxy settings for the given protocols. Supported protocols are given by the PROTOCOL_* flags. Users can use this class to pass proxy settings to Webrenderer, but also for Webrenderer to supply information back to the user.


Field Summary
static int PROTOCOL_ALL
          Indicates the settings will affect all protocols.
static int PROTOCOL_FTP
          Indicates the settings will be used for the file transfer protcol.
static int PROTOCOL_GOPHER
          Indicates the settings will be used for the gopher protcol.
static int PROTOCOL_HTTP
          Indicates the settings will be used for the hypertext transfer protcol.
static int PROTOCOL_HTTPS
          Indicates the settings will be used for the secure hypertext transfer protcol.
static int PROTOCOL_SOCKS
          Indicates the settings will be used for the socks server protcol.
 
Constructor Summary
ProxySetting()
          Constructor for ProxySetting.
ProxySetting(int protocol, java.lang.String server, int port)
          Constructor for ProxySetting with initial settings.
ProxySetting(ProxySetting proxy)
          Copy Constuctor for ProxySetting
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getPort()
          Returns the port number the proxy server communicates on.
 int getProtocol()
          Returns the protocols defined by the PROTOCOL_* flags.
 java.lang.String getServer()
          Returns the URL of the proxy server.
 void setPort(int port)
          Sets the port number the proxy server communicates on.
 void setProtocol(int protocol)
          Sets the protocols defined by the PROTOCOL_* flags.
 void setServer(java.lang.String server)
          Sets the URL of the proxy server.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOCOL_FTP

public static final int PROTOCOL_FTP
Indicates the settings will be used for the file transfer protcol.

See Also:
Constant Field Values

PROTOCOL_HTTP

public static final int PROTOCOL_HTTP
Indicates the settings will be used for the hypertext transfer protcol.

See Also:
Constant Field Values

PROTOCOL_HTTPS

public static final int PROTOCOL_HTTPS
Indicates the settings will be used for the secure hypertext transfer protcol.

See Also:
Constant Field Values

PROTOCOL_SOCKS

public static final int PROTOCOL_SOCKS
Indicates the settings will be used for the socks server protcol.

See Also:
Constant Field Values

PROTOCOL_GOPHER

public static final int PROTOCOL_GOPHER
Indicates the settings will be used for the gopher protcol.

See Also:
Constant Field Values

PROTOCOL_ALL

public static final int PROTOCOL_ALL
Indicates the settings will affect all protocols.

See Also:
Constant Field Values
Constructor Detail

ProxySetting

public ProxySetting()
Constructor for ProxySetting. The protocol, server, and port are not initialised.


ProxySetting

public ProxySetting(int protocol,
                    java.lang.String server,
                    int port)
Constructor for ProxySetting with initial settings.

Parameters:
protocol - Protocol(s), defined by PROTOCOL_* flags.
server - URL of the proxy server.
port - Port the proxy server uses.

ProxySetting

public ProxySetting(ProxySetting proxy)
Copy Constuctor for ProxySetting

Parameters:
proxy - A ProxySetting to copy
Method Detail

getPort

public int getPort()
Returns the port number the proxy server communicates on.

Returns:
Port number.

getProtocol

public int getProtocol()
Returns the protocols defined by the PROTOCOL_* flags.

Returns:
Protocols.

getServer

public java.lang.String getServer()
Returns the URL of the proxy server.

Returns:
Proxy server URL.

setPort

public void setPort(int port)
Sets the port number the proxy server communicates on.

Parameters:
port - Port number

setProtocol

public void setProtocol(int protocol)
Sets the protocols defined by the PROTOCOL_* flags.

Parameters:
protocol - Protocols.

setServer

public void setServer(java.lang.String server)
Sets the URL of the proxy server.

Parameters:
server - Proxy server URL.

equals

public boolean equals(java.lang.Object obj)

toString

public java.lang.String toString()