Package mage.remote.Connection

Examples of mage.remote.Connection.ProxyType


        String userName = prefs.get("userName", "");
        String server = prefs.get("serverAddress", "");
        int port = Integer.parseInt(prefs.get("serverPort", ""));
        String proxyServer = prefs.get("proxyAddress", "");
        int proxyPort = Integer.parseInt(prefs.get("proxyPort", "0"));
        ProxyType proxyType = ProxyType.valueByText(prefs.get("proxyType", "None"));
        String proxyUsername = prefs.get("proxyUsername", "");
        String proxyPassword = prefs.get("proxyPassword", "");
        int avatarId = PreferencesDialog.getSelectedAvatar();
        boolean showAbilityPickerForced = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_ABILITY_PICKER_FORCED, "true").equals("true");
        try {
View Full Code Here


            connection = new Connection();
            connection.setHost(this.txtServer.getText().trim());
            connection.setPort(Integer.valueOf(this.txtPort.getText().trim()));
            connection.setUsername(this.txtUserName.getText().trim());

            ProxyType configProxyType = Connection.ProxyType.valueByText(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_PROXY_TYPE, "None"));

            if (configProxyType != null) {
                connection.setProxyType(configProxyType);
                if (!configProxyType.equals(ProxyType.NONE)) {
                    String host = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_PROXY_ADDRESS, "");
                    String port = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_PROXY_PORT, "");
                    if (!host.isEmpty() && !port.isEmpty()) {
                        connection.setProxyHost(host);
                        connection.setProxyPort(Integer.valueOf(port));
View Full Code Here

TOP

Related Classes of mage.remote.Connection.ProxyType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.