Package biz.onixs.util.network
Class ProxySettings
- java.lang.Object
-
- biz.onixs.util.network.ProxySettings
-
public class ProxySettings extends Object
This class represents the settings for a proxy server, including the host, port, username, and password. It can be used to configure a proxy server connection for session.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProxySettings.TypeEnumeration representing proxy types: HTTP and SOCKS.
-
Constructor Summary
Constructors Constructor Description ProxySettings(ProxySettings.Type type, String host, int port, String username, String password)Constructs a ProxySettings object with the specified proxy host, port, username, and password.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetHost()Returns the proxy host.StringgetPassword()Returns the proxy password.intgetPort()Returns the proxy port.ProxySettings.TypegetType()Returns the proxy type seeProxySettings.Typeenum.StringgetUsername()Returns the proxy username.
-
-
-
Constructor Detail
-
ProxySettings
public ProxySettings(ProxySettings.Type type, String host, int port, String username, String password)
Constructs a ProxySettings object with the specified proxy host, port, username, and password.- Parameters:
type- the proxy type seeProxySettings.Typeenum.host- the hostname or IP address of the proxy serverport- the port number on which the proxy server is listeningusername- the username for authentication with the proxy server (can be "" if no authentication is required)password- the password for authentication with the proxy server (can be "" if no authentication is required)
-
-
Method Detail
-
getType
public ProxySettings.Type getType()
Returns the proxy type seeProxySettings.Typeenum.- Returns:
- the proxy type see
ProxySettings.Typeenum.
-
getHost
public String getHost()
Returns the proxy host.- Returns:
- the hostname or IP address of the proxy server
-
getPort
public int getPort()
Returns the proxy port.- Returns:
- the port number on which the proxy server is listening
-
getUsername
public String getUsername()
Returns the proxy username.- Returns:
- the username for authentication with the proxy server, or null if no authentication is required
-
getPassword
public String getPassword()
Returns the proxy password.- Returns:
- the password for authentication with the proxy server, or null if no authentication is required
-
-