001: package net.sourceforge.squirrel_sql.fw.util;
002:
003: /*
004: * Copyright (C) 2002-2003 Colin Bell
005: * colbell@users.sourceforge.net
006: *
007: * This library is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation; either
010: * version 2.1 of the License, or (at your option) any later version.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this library; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020: */
021: /**
022: * Proxy server settings.
023: *
024: * @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
025: */
026: public class ProxySettings implements Cloneable {
027: /** If <TT>true</TT> use a HTTP proxy server. */
028: private boolean _httpUseProxy;
029:
030: /** Name of HTTP Proxy server. */
031: private String _httpProxyServer;
032:
033: /** Port for HTTP Proxy server. */
034: private String _httpProxyPort;
035:
036: /** User name for HTTP Proxy server. */
037: private String _httpProxyUser;
038:
039: /** Password for HTTP Proxy server. */
040: private String _httpProxyPassword;
041:
042: /**
043: * List of hosts (separated by a '|') that we don't use a HTTP proxy for.
044: */
045: private String _httpNonProxyHosts;
046:
047: /** If <TT>true</TT> use a SOCKS proxy server. */
048: private boolean _socksUseProxy;
049:
050: /** Name of SOCKS Proxy server. */
051: private String _socksProxyServer;
052:
053: /** Port for SOCKS Proxy server. */
054: private String _socksProxyPort;
055:
056: /**
057: * Return a copy of this object.
058: */
059: public Object clone() {
060: try {
061: return super .clone();
062: } catch (CloneNotSupportedException ex) {
063: throw new InternalError(ex.getMessage()); // Impossible.
064: }
065: }
066:
067: public boolean getHttpUseProxy() {
068: return _httpUseProxy;
069: }
070:
071: public void setHttpUseProxy(boolean data) {
072: _httpUseProxy = data;
073: }
074:
075: public String getHttpProxyServer() {
076: return _httpProxyServer;
077: }
078:
079: public void setHttpProxyServer(String data) {
080: _httpProxyServer = data;
081: }
082:
083: public String getHttpProxyPort() {
084: return _httpProxyPort;
085: }
086:
087: public void setHttpProxyPort(String data) {
088: _httpProxyPort = data;
089: }
090:
091: public String getHttpProxyUser() {
092: return _httpProxyUser;
093: }
094:
095: public void setHttpProxyUser(String data) {
096: _httpProxyUser = data;
097: }
098:
099: public String getHttpProxyPassword() {
100: return _httpProxyPassword;
101: }
102:
103: public void setHttpProxyPassword(String data) {
104: _httpProxyPassword = data;
105: }
106:
107: public String getHttpNonProxyHosts() {
108: return _httpNonProxyHosts;
109: }
110:
111: public void setHttpNonProxyHosts(String data) {
112: _httpNonProxyHosts = data;
113: }
114:
115: public boolean getSocksUseProxy() {
116: return _socksUseProxy;
117: }
118:
119: public void setSocksUseProxy(boolean data) {
120: _socksUseProxy = data;
121: }
122:
123: public String getSocksProxyServer() {
124: return _socksProxyServer;
125: }
126:
127: public void setSocksProxyServer(String data) {
128: _socksProxyServer = data;
129: }
130:
131: public String getSocksProxyPort() {
132: return _socksProxyPort;
133: }
134:
135: public void setSocksProxyPort(String data) {
136: _socksProxyPort = data;
137: }
138: }
|