Package host.anzo.simon
Class SimonProxyConfig
java.lang.Object
host.anzo.simon.SimonProxyConfig
A pojo class that holds information about the proxy configuration
needed to establish a SIMON connection via a proxy server
-
Constructor Summary
ConstructorsConstructorDescriptionSimonProxyConfig(String proxyHost, int proxyPort, boolean authRequired, String username, String password) Constructor for the proxy config class. -
Method Summary
Modifier and TypeMethodDescriptionGets the password that was set for proxy authenticationReturns the current set proxy hostintReturns the current set port on which the proxy listens for incoming connectionsGets the username that was set for proxy authenticationbooleanReturns the current set "authentication required?" flagvoidsetAuthRequired(boolean authRequired) Sets whether the proxy needs authentication or notvoidsetPassword(String password) Sets the password that is needed for proxy authenticationvoidsetProxyHost(String proxyHost) Sets the proxy host to connect tovoidsetProxyPort(int proxyPort) Sets the port on which the proxy listens for incoming connectionsvoidsetUsername(String username) Sets the username that is needed for proxy authenticationtoString()
-
Constructor Details
-
SimonProxyConfig
public SimonProxyConfig(String proxyHost, int proxyPort, boolean authRequired, String username, String password) Constructor for the proxy config class. Let's one set all needed information at once. if authRequired==null, username and password can be null- Parameters:
proxyHost- the proxy's hostproxyPort- the proxy's portauthRequired- does the proxy require an authentication?username- username, if authentication is requiredpassword- password, if authentication is required
-
-
Method Details
-
getProxyHost
Returns the current set proxy host- Returns:
- the proxy's host
-
setProxyHost
Sets the proxy host to connect to- Parameters:
proxyHost- the proxyHost to connect to
-
getProxyPort
public int getProxyPort()Returns the current set port on which the proxy listens for incoming connections- Returns:
- the proxyPort
-
setProxyPort
public void setProxyPort(int proxyPort) Sets the port on which the proxy listens for incoming connections- Parameters:
proxyPort- the proxy's port
-
isAuthRequired
public boolean isAuthRequired()Returns the current set "authentication required?" flag- Returns:
- true, if flag is set, false if not
-
setAuthRequired
public void setAuthRequired(boolean authRequired) Sets whether the proxy needs authentication or not- Parameters:
authRequired- true, if auth. is required, false if not
-
getUsername
Gets the username that was set for proxy authentication- Returns:
- the username
-
setUsername
Sets the username that is needed for proxy authentication- Parameters:
username- the username to set
-
getPassword
Gets the password that was set for proxy authentication- Returns:
- the password
-
setPassword
Sets the password that is needed for proxy authentication- Parameters:
password- the password to set
-
toString
-