de.scheisseichfindemalkeinen.settings
Class ProxyManager

java.lang.Object
  extended by de.scheisseichfindemalkeinen.settings.ProxyManager

public class ProxyManager
extends java.lang.Object

Class which provides method to get a preconfigured HttpClient, so that in the hole program the proxysettings can be used.


Field Summary
static int DIRECT_CONNECTION
          Direct connection
static int HTTP_PROXY
          Connection over a proxy
static java.lang.String USER_AGENT
          Deprecated. User-Agent is now configurable by the user. Please use SettingsManager.instance().getUserAgent()
 
Method Summary
 org.apache.http.client.HttpClient getHTTPClient()
          Returns a preconfigured HttpClient
 int getMode()
          Returns the mode
 org.apache.http.client.HttpClient getNonMultithreadedHTTPClient()
          Returns a preconfigured HttpClient, but without usage of the Mutli Threaded Connection Manager I need this, because of some problems on download and import html files.
 java.lang.String getProxyname()
          Returns the proxyname
 java.lang.String getProxypassword()
          Returns the proxypassword
 int getProxyport()
          Returns the proxyport
 java.lang.String getProxyuser()
          Returns the proxyuser
static ProxyManager instance()
          Returns the Singleton
 boolean isAuth()
          Returns the auth
 void readFromSettings()
          Read the settings
 void setAuth(boolean auth)
          Sets the auth
 void setMode(int mode)
          Sets the mode
 void setProxyname(java.lang.String proxyname)
          Sets the proxyname
 void setProxypassword(java.lang.String proxypassword)
          Sets the proxypassword
 void setProxyport(int proxyport)
          Sets the proxyport
 void setProxyuser(java.lang.String proxyuser)
          Sets the proxyuser
 void writeToSettings()
          Save the settings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_AGENT

public static final java.lang.String USER_AGENT
Deprecated. User-Agent is now configurable by the user. Please use SettingsManager.instance().getUserAgent()
User Agent

See Also:
Constant Field Values

DIRECT_CONNECTION

public static final int DIRECT_CONNECTION
Direct connection

See Also:
Constant Field Values

HTTP_PROXY

public static final int HTTP_PROXY
Connection over a proxy

See Also:
Constant Field Values
Method Detail

instance

public static ProxyManager instance()
Returns the Singleton

Returns:
Singleton

getHTTPClient

public org.apache.http.client.HttpClient getHTTPClient()
Returns a preconfigured HttpClient

Returns:
HttpClient

getNonMultithreadedHTTPClient

public org.apache.http.client.HttpClient getNonMultithreadedHTTPClient()
Returns a preconfigured HttpClient, but without usage of the Mutli Threaded Connection Manager I need this, because of some problems on download and import html files.

Returns:
HttpClient
See Also:
ImportHTML.ImportHTML(String, String)

writeToSettings

public void writeToSettings()
Save the settings


readFromSettings

public void readFromSettings()
Read the settings


getProxyuser

public java.lang.String getProxyuser()
Returns the proxyuser

Returns:
proxyuser

setProxyuser

public void setProxyuser(java.lang.String proxyuser)
Sets the proxyuser

Parameters:
proxyuser - proxyuser

getMode

public int getMode()
Returns the mode

Returns:
mode

setMode

public void setMode(int mode)
Sets the mode

Parameters:
mode - mode

getProxyname

public java.lang.String getProxyname()
Returns the proxyname

Returns:
proxyname

setProxyname

public void setProxyname(java.lang.String proxyname)
Sets the proxyname

Parameters:
proxyname - proxyname

getProxyport

public int getProxyport()
Returns the proxyport

Returns:
proxyport

setProxyport

public void setProxyport(int proxyport)
Sets the proxyport

Parameters:
proxyport - proxyport

getProxypassword

public java.lang.String getProxypassword()
Returns the proxypassword

Returns:
proxypassword

setProxypassword

public void setProxypassword(java.lang.String proxypassword)
Sets the proxypassword

Parameters:
proxypassword - proxypassword

isAuth

public boolean isAuth()
Returns the auth

Returns:
auth

setAuth

public void setAuth(boolean auth)
Sets the auth

Parameters:
auth - auth