001: package com.sun.portal.rproxy.server;
002:
003: import java.util.ArrayList;
004: import java.util.Collections;
005: import java.util.List;
006:
007: public class DefaultGatewayContext implements GatewayContext {
008:
009: public static final int DEFAULT_HTTP_PORT = 80;
010:
011: public static final int DEFAULT_HTTPS_PORT = 443;
012:
013: public static final int HTTPPROXY_DEFAULT_PORT = 10443;
014:
015: public static final int EPROXY_CONNECTION_Q_LENGTH = 50;
016:
017: private static final String EMPTY_STRING = "";
018:
019: public boolean isEProxyEnabled() {
020: return eproxyEnabled;
021: }
022:
023: public boolean isPProxyEnabled() {
024: return pproxyEnabled;
025: }
026:
027: public boolean isHttpEnabled() {
028: return httpEnabled;
029: }
030:
031: public boolean isHttpsEnabled() {
032: return httpsEnabled;
033: }
034:
035: public int getHttpPort() {
036: return httpPort;
037: }
038:
039: public int getHttpsPort() {
040: return httpsPort;
041: }
042:
043: public int getConnectionQLength() {
044: return eproxyConnectionQLength;
045: }
046:
047: public int getHttpProxyPort() {
048: return httpProxyPort;
049: }
050:
051: public List getDomainsAndSubDomainsList() {
052: return domainsAndSubDomainsList;
053: }
054:
055: public String getDefaultDomainAndSubDomain() {
056: return defaultDomainAndSubDomain;
057: }
058:
059: public boolean isTranslateAll() {
060: return translateAll;
061: }
062:
063: // //////////////////////////////////////////////////////////////
064:
065: private List domainsAndSubDomainsList = Collections.EMPTY_LIST;
066:
067: private boolean translateAll = false;
068:
069: private String defaultDomainAndSubDomain = EMPTY_STRING;
070:
071: private int httpProxyPort = HTTPPROXY_DEFAULT_PORT;
072:
073: private int eproxyConnectionQLength = EPROXY_CONNECTION_Q_LENGTH;
074:
075: private boolean eproxyEnabled = true;
076:
077: private boolean pproxyEnabled = false;
078:
079: private boolean httpEnabled = false;
080:
081: private boolean httpsEnabled = true;
082:
083: private int httpPort = DEFAULT_HTTP_PORT;
084:
085: private int httpsPort = DEFAULT_HTTPS_PORT;
086:
087: public void setDomainsAndSubDomainsList(List list) {
088: domainsAndSubDomainsList = new ArrayList();
089: domainsAndSubDomainsList.addAll(list);
090: }
091:
092: public void setDefaultDomainAndSubDomain(
093: String defaultDomainAndSubDomain) {
094: this .defaultDomainAndSubDomain = defaultDomainAndSubDomain;
095: }
096:
097: public void setTranslateAll(boolean translateAll) {
098: this .translateAll = translateAll;
099: }
100:
101: public String getPACFileLocation() {
102: return "";
103: }
104:
105: public boolean isPACFileEnabled() {
106: return false;
107: }
108: }
|