Interface IConnection
-
- All Known Implementing Classes:
NetworkConnectionManager
public interface IConnection
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
applyProxySettings(HttpURLConnection request)
applyProxySettingsString
getLastFoundProxyAddress()
getLastFoundProxyAddressEnums.ProxyType
getProxyType()
getProxyTypeString
getServerApiUrl()
getServerApiUrlString
getServerHostName()
getServerHostNameString
getServerUrl()
getServerUrlString
getSubdomain()
getSubdomainboolean
getUseCredentials()
getUseCredentialsboolean
isConnectedToInternet()
isConnectedToInternetboolean
isConnectedToInternet2()
isConnectedToInternet2void
saveProxySettings(Enums.ProxyType proxyType, String addr, String usr, String pass, int port, boolean useCredentials)
saveProxySettingsvoid
setServerUrl(String m_ServerUrl)
setServerUrlboolean
shouldAskUserForConnectionSettings()
shouldAskUserForConnectionSettingsboolean
shouldAskUserForProxyCredentials()
shouldAskUserForProxyCredentialsEnums.ConnectionError
testConnectionSettings()
testConnectionSettingsEnums.ConnectionError
testConnectionSettings(Enums.ProxyType proxyType, boolean useProxyAuthentication, String proxyUrl, String usr, String pass, int port)
testConnectionSettingsEnums.ConnectionError
testConnectionSettings(String serverUrl, Enums.ProxyType proxyType, boolean useProxyAuthentication, String proxyUrl, String usr, String pass, int port)
testConnectionSettings
-
-
-
Method Detail
-
getLastFoundProxyAddress
String getLastFoundProxyAddress()
getLastFoundProxyAddress- Returns:
- last proxy address
-
getServerUrl
String getServerUrl()
getServerUrl- Returns:
- server URL
-
setServerUrl
void setServerUrl(String m_ServerUrl)
setServerUrl- Parameters:
m_ServerUrl
-
-
getServerHostName
String getServerHostName()
getServerHostName- Returns:
- server host name
-
getServerApiUrl
String getServerApiUrl()
getServerApiUrl- Returns:
- server Api URL
-
getProxyType
Enums.ProxyType getProxyType()
getProxyType- Returns:
- proxy type
-
getUseCredentials
boolean getUseCredentials()
getUseCredentials- Returns:
- True if use credential; Otherwise false
-
getSubdomain
String getSubdomain()
getSubdomain- Returns:
- Sub domain
-
saveProxySettings
void saveProxySettings(Enums.ProxyType proxyType, String addr, String usr, String pass, int port, boolean useCredentials)
saveProxySettings- Parameters:
proxyType
- Proxy typeaddr
- Addressusr
- Userpass
- Passwordport
- PortuseCredentials
- True if use credential; Otherwise false
-
shouldAskUserForConnectionSettings
boolean shouldAskUserForConnectionSettings()
shouldAskUserForConnectionSettings- Returns:
- True if ask user for connection settings; Otherwise false
-
shouldAskUserForProxyCredentials
boolean shouldAskUserForProxyCredentials()
shouldAskUserForProxyCredentials- Returns:
- True if ask user for proxy credentials; Otherwise false
-
applyProxySettings
void applyProxySettings(HttpURLConnection request)
applyProxySettings- Parameters:
request
- Request
-
testConnectionSettings
Enums.ConnectionError testConnectionSettings()
testConnectionSettings- Returns:
- Returns ConnectionError
-
testConnectionSettings
Enums.ConnectionError testConnectionSettings(String serverUrl, Enums.ProxyType proxyType, boolean useProxyAuthentication, String proxyUrl, String usr, String pass, int port)
testConnectionSettings- Parameters:
serverUrl
- Server URLproxyType
- Proxy typeuseProxyAuthentication
- Whether use proxy authenticationproxyUrl
- Proxy URLusr
- Userpass
- Passwordport
- Port- Returns:
- Returns ConnectionError
-
testConnectionSettings
Enums.ConnectionError testConnectionSettings(Enums.ProxyType proxyType, boolean useProxyAuthentication, String proxyUrl, String usr, String pass, int port)
testConnectionSettings- Parameters:
proxyType
- Proxy typeuseProxyAuthentication
- Whether use proxy authenticationproxyUrl
- Proxy URLusr
- Userpass
- Passwordport
- Port- Returns:
- Returns ConnectionError
-
isConnectedToInternet
boolean isConnectedToInternet()
isConnectedToInternet- Returns:
- True if connected to internet; Otherwise false
-
isConnectedToInternet2
boolean isConnectedToInternet2()
isConnectedToInternet2- Returns:
- True if connected to internet; Otherwise false
-
-