Interface IConnection

    • 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 type
        addr - Address
        usr - User
        pass - Password
        port - Port
        useCredentials - 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 URL
        proxyType - Proxy type
        useProxyAuthentication - Whether use proxy authentication
        proxyUrl - Proxy URL
        usr - User
        pass - Password
        port - 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 type
        useProxyAuthentication - Whether use proxy authentication
        proxyUrl - Proxy URL
        usr - User
        pass - Password
        port - 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