-move some classes
git-svn-id: https://svn.apache.org/repos/asf/lenya/trunk@1038627 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/cocoon/components/modules/input/ProxyModule.java b/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/cocoon/components/modules/input/ProxyModule.java
deleted file mode 100644
index 6266182..0000000
--- a/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/cocoon/components/modules/input/ProxyModule.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.cocoon.components.modules.input.AbstractInputModule;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.lenya.cms.linking.LinkRewriter;
-import org.apache.lenya.cms.linking.OutgoingLinkRewriter;
-import org.apache.lenya.cms.publication.Repository;
-import org.apache.lenya.cms.publication.Session;
-
-/**
- * <p>
- * Input module for getting the base URL which may be prepended to internal URLs to construct links.
- * The functionality corresponds to the
- * {@link org.apache.lenya.cms.cocoon.transformation.ProxyTransformer} with one exception: If the
- * <em>webappUrl</em> parameter is an empty string, the root proxy URL (or the context prefix,
- * resp.) is returned.
- * </p>
- * <p>
- * Usage: <code>{proxy:{webappUrl}}</code>
- * </p>
- * <p>
- * The module can be configured to use absolute or relative URLs in the same way as the
- * {@link org.apache.lenya.cms.cocoon.transformation.ProxyTransformer}.
- * </p>
- */
-public class ProxyModule extends AbstractInputModule {
-
- protected static final String ATTRIBUTE_TYPE = "type";
- protected static final String URL_TYPE_ABSOLUTE = "absolute";
- protected static final String URL_TYPE_RELATIVE = "relative";
- protected static final String PARAMETER_URLS = "urls";
-
- private boolean relativeUrls;
- protected Repository repository;
-
- /**
- * @see org.apache.cocoon.components.modules.input.InputModule#getAttribute(java.lang.String,
- * org.apache.avalon.framework.configuration.Configuration, java.util.Map)
- */
- public Object getAttribute(String name, Configuration modeConf, Map objectModel)
- throws ConfigurationException {
-
- final String webappUrl = name;
- Request request = ObjectModelHelper.getRequest(objectModel);
-
- String value = null;
- try {
- if (webappUrl.equals("")) {
- value = rewrite(request, "/");
- if (value.endsWith("/")) {
- value = value.substring(0, value.length() - 1);
- }
- } else {
- value = rewrite(request, webappUrl);
- }
- } catch (ConfigurationException e) {
- throw e;
- } catch (Exception e) {
- throw new ConfigurationException("Obtaining value for [" + name + "] failed: ", e);
- }
- return value;
- }
-
- protected String rewrite(Request request, String url) throws ConfigurationException {
- Session session = this.repository.getSession(request);
- LinkRewriter rewriter = new OutgoingLinkRewriter(session, request.getRequestURI(), request
- .isSecure(), false, this.relativeUrls);
- if (!rewriter.matches(url)) {
- throw new ConfigurationException("The URL [" + url + "] can't be rewritten!");
- }
- return rewriter.rewrite(url);
- }
-
- /**
- * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeNames(org.apache.avalon.framework.configuration.Configuration,
- * java.util.Map)
- */
- public Iterator getAttributeNames(Configuration modeConf, Map objectModel)
- throws ConfigurationException {
- return Collections.EMPTY_SET.iterator();
- }
-
- /**
- * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeValues(java.lang.String,
- * org.apache.avalon.framework.configuration.Configuration, java.util.Map)
- */
- public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel)
- throws ConfigurationException {
- Object[] objects = { getAttribute(name, modeConf, objectModel) };
- return objects;
- }
-
- public void configure(Configuration conf) throws ConfigurationException {
- super.configure(conf);
- Configuration urlConfig = conf.getChild(PARAMETER_URLS, false);
- if (urlConfig != null) {
- String value = urlConfig.getAttribute(ATTRIBUTE_TYPE);
- setUrlType(value);
- }
- }
-
- protected void setUrlType(String value) throws ConfigurationException {
- if (value.equals(URL_TYPE_RELATIVE)) {
- this.relativeUrls = true;
- } else if (value.equals(URL_TYPE_ABSOLUTE)) {
- this.relativeUrls = false;
- } else {
- throw new ConfigurationException("Invalid URL type [" + value
- + "], must be relative or absolute.");
- }
- }
-
- public void setRepository(Repository repository) {
- this.repository = repository;
- }
-
-}
\ No newline at end of file
diff --git a/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/cocoon/transformation/ProxyTransformer.java b/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/cocoon/transformation/ProxyTransformer.java
deleted file mode 100644
index 97e43f5..0000000
--- a/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/cocoon/transformation/ProxyTransformer.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.lenya.cms.cocoon.transformation;
-
-import java.io.IOException;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.lenya.cms.linking.LinkRewriter;
-import org.apache.lenya.cms.linking.OutgoingLinkRewriter;
-import org.apache.lenya.cms.publication.Repository;
-import org.apache.lenya.cms.publication.Session;
-import org.xml.sax.SAXException;
-
-/**
- * <p>
- * Proxy transformer.
- * </p>
- * <p>
- * The resulting URLs can either be absolute (default) or relative. You can either configure this
- * when declaring the transformer:
- * </p>
- * <code><pre>
- * <map:transformer ... >
- * <urls type="relative"/>
- * ...
- * </map:transformer>
- * </pre></code>
- * <p>
- * or pass a parameter:
- * </p>
- * <code><pre>
- * <map:parameter name="urls" value="relative"/>
- * </pre></code>
- * @see OutgoingLinkRewriter
- */
-public class ProxyTransformer extends AbstractLinkTransformer {
-
- protected static final String ATTRIBUTE_TYPE = "type";
- protected static final String URL_TYPE_ABSOLUTE = "absolute";
- protected static final String URL_TYPE_RELATIVE = "relative";
- protected static final String PARAMETER_URLS = "urls";
-
- private boolean relativeUrls = false;
- private LinkRewriter rewriter;
- private Repository repository;
-
- public void setup(SourceResolver resolver, Map objectModel, String source, Parameters params)
- throws ProcessingException, SAXException, IOException {
- super.setup(resolver, objectModel, source, params);
- Request request = ObjectModelHelper.getRequest(objectModel);
-
- try {
- if (params.isParameter(PARAMETER_URLS)) {
- setUrlType(params.getParameter(PARAMETER_URLS));
- }
- Session session = this.repository.getSession(request);
- String webappUrl = getWebappUrl(params, objectModel);
- this.rewriter = new OutgoingLinkRewriter(session, webappUrl, request.isSecure(), false,
- this.relativeUrls);
- } catch (final Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- public void configure(Configuration config) throws ConfigurationException {
- super.configure(config);
- Configuration urlConfig = config.getChild(PARAMETER_URLS, false);
- if (urlConfig != null) {
- String value = urlConfig.getAttribute(ATTRIBUTE_TYPE);
- setUrlType(value);
- }
- }
-
- protected void setUrlType(String value) throws ConfigurationException {
- if (value.equals(URL_TYPE_RELATIVE)) {
- this.relativeUrls = true;
- } else if (value.equals(URL_TYPE_ABSOLUTE)) {
- this.relativeUrls = false;
- } else {
- throw new ConfigurationException("Invalid URL type [" + value
- + "], must be relative or absolute.");
- }
- }
-
- protected LinkRewriter getLinkRewriter() {
- return this.rewriter;
- }
-
- public void recycle() {
- super.recycle();
- this.rewriter = null;
- }
-
- public void setRepository(Repository repository) {
- this.repository = repository;
- }
-
-
-}
diff --git a/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/linking/GlobalProxies.java b/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/linking/GlobalProxies.java
deleted file mode 100644
index 743fcf4..0000000
--- a/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/linking/GlobalProxies.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.lenya.cms.linking;
-
-import org.apache.lenya.cms.publication.Proxy;
-
-/**
- * Service to manage the web-application-wide proxy settings.
- */
-public interface GlobalProxies {
-
- /**
- * The service role.
- */
- String ROLE = GlobalProxies.class.getName();
-
- /**
- * @param ssl If SSL is used.
- * @return A proxy.
- */
- Proxy getProxy(boolean ssl);
-
-}
diff --git a/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/linking/OutgoingLinkRewriter.java b/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/linking/OutgoingLinkRewriter.java
deleted file mode 100644
index 0b78b0e..0000000
--- a/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/linking/OutgoingLinkRewriter.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.lenya.cms.linking;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.cocoon.spring.configurator.WebAppContextUtils;
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.AccessControllerResolver;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Policy;
-import org.apache.lenya.ac.PolicyManager;
-import org.apache.lenya.cms.publication.Proxy;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.Session;
-import org.apache.lenya.cms.publication.URLInformation;
-import org.apache.lenya.util.StringUtil;
-
-/**
- * <p>
- * Converts web application links to links which will be sent to the browser by using the
- * publication's proxy settings. If the current request is SSL-encrypted, all link URLs will use the
- * SSL proxy.
- * </p>
- * <p>
- * Objects of this class are not thread-safe.
- * </p>
- */
-public class OutgoingLinkRewriter extends ServletLinkRewriter {
-
- private boolean relativeUrls;
- private PolicyManager policyManager;
- private AccreditableManager accreditableManager;
- private boolean ssl;
- private GlobalProxies globalProxies;
- private boolean considerSslPolicies;
- private Session session;
-
- /**
- * @param session The current session.
- * @param requestUrl The requested web application URL (without servlet context path) where the
- * links should be rewritten.
- * @param ssl If the current page is SSL-encrypted.
- * @param considerSslPolicies If the SSL protection of policies should be considered when
- * resolving the corresponding proxy. Setting this to <code>true</code> leads to a
- * substantial performance overhead.
- * @param relativeUrls If relative URLs should be created.
- */
- public OutgoingLinkRewriter(Session session, String requestUrl, boolean ssl,
- boolean considerSslPolicies, boolean relativeUrls) {
- this.requestUrl = requestUrl;
- this.relativeUrls = relativeUrls;
- this.ssl = ssl;
- this.considerSslPolicies = considerSslPolicies;
-
- try {
- this.session = session;
-
- if (this.considerSslPolicies) {
- AccessControllerResolver acResolver = (AccessControllerResolver) WebAppContextUtils
- .getCurrentWebApplicationContext().getBean(AccessControllerResolver.ROLE);
- AccessController accessController = acResolver.resolveAccessController(requestUrl);
- if (accessController != null) {
- this.accreditableManager = accessController.getAccreditableManager();
- this.policyManager = accessController.getPolicyManager();
- }
- }
-
- String[] pubIds = this.session.getPublicationIds();
- for (String pubId : pubIds) {
- this.publicationCache.put(pubId, this.session.getPublication(pubId));
- }
-
- } catch (final Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- protected GlobalProxies getGlobalProxies() {
- if (this.globalProxies == null) {
- this.globalProxies = (GlobalProxies) WebAppContextUtils
- .getCurrentWebApplicationContext().getBean(GlobalProxies.ROLE);
- }
- return this.globalProxies;
- }
-
- public boolean matches(String url) {
- return url.startsWith("/");
- }
-
- private Map<String, Publication> publicationCache = new HashMap<String, Publication>();
-
- protected Publication getPublication(String pubId) throws PublicationException {
- return (Publication) this.publicationCache.get(pubId);
- }
-
- public String rewrite(final String url) {
-
- String rewrittenUrl = "";
-
- String path;
- String suffix;
-
- int numIndex = url.indexOf('#');
- if (numIndex > -1) {
- path = url.substring(0, numIndex);
- suffix = url.substring(numIndex);
- } else {
- int qmIndex = url.indexOf('?');
- if (qmIndex > -1) {
- path = url.substring(0, qmIndex);
- suffix = url.substring(qmIndex);
- } else {
- path = url;
- suffix = "";
- }
- }
-
- try {
- String normalizedUrl = normalizeUrl(path);
- if (this.relativeUrls) {
- rewrittenUrl = getRelativeUrlTo(normalizedUrl);
- } else {
- boolean useSsl = this.ssl;
- if (!useSsl && this.policyManager != null) {
- Policy policy = this.policyManager.getPolicy(this.accreditableManager,
- normalizedUrl);
- useSsl = policy.isSSLProtected();
- }
-
- URLInformation info = new URLInformation(normalizedUrl);
- String pubId = info.getPublicationId();
-
- Publication pub = null;
- if (pubId != null) {
- pub = getPublication(pubId);
- }
-
- // link points to publication
- if (pub != null) {
- rewrittenUrl = rewriteLink(normalizedUrl, pub, useSsl);
- }
-
- // link doesn't point to publication
- else {
- Proxy proxy = getGlobalProxies().getProxy(ssl);
- rewrittenUrl = proxy.getUrl() + normalizedUrl;
- }
- }
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- return rewrittenUrl + suffix;
- }
-
- protected String normalizeUrl(final String url) throws URISyntaxException {
- String normalizedUrl;
- if (url.indexOf("..") > -1) {
- normalizedUrl = new URI(url).normalize().toString();
- } else {
- normalizedUrl = url;
- }
- return normalizedUrl;
- }
-
- private String requestUrl;
-
- private Map pubId2areaList = new HashMap();
-
- /**
- * Checks if a publication has an area by using a cache for performance reasons.
- * @param pub The publication.
- * @param area The area name.
- * @return if the publication contains the area.
- */
- protected boolean hasArea(Publication pub, String area) {
- String pubId = pub.getId();
- List areas = (List) this.pubId2areaList.get(pubId);
- if (areas == null) {
- areas = Arrays.asList(pub.getAreaNames());
- this.pubId2areaList.put(pubId, areas);
- }
- return areas.contains(area);
- }
-
- /**
- * @param linkUrl The original link URL.
- * @param pub The publication to use for proxy resolving.
- * @param ssl If the URL uses SSL.
- * @return A link URL.
- */
- protected String rewriteLink(String linkUrl, Publication pub, boolean ssl) {
- URLInformation info = new URLInformation(linkUrl);
- String rewrittenUrl;
- String areaName = info.getArea();
-
- // valid area
- if (areaName != null && hasArea(pub, areaName)) {
- Proxy proxy = pub.getProxy(areaName, ssl);
- rewrittenUrl = proxy.getUrl() + info.getDocumentUrl();
- }
-
- // invalid area
- else {
- Proxy proxy = getGlobalProxies().getProxy(ssl);
- rewrittenUrl = proxy.getUrl() + linkUrl;
- }
- return rewrittenUrl;
- }
-
- protected String getRelativeUrlTo(String webappUrl) {
- String relativeUrl;
- if (this.requestUrl.equals(webappUrl)) {
- relativeUrl = getLastStep(webappUrl);
- } else {
- List sourceSteps = toList(this.requestUrl);
- List targetSteps = toList(webappUrl);
-
- String lastEqualStep = null;
-
- while (!sourceSteps.isEmpty() && !targetSteps.isEmpty()
- && sourceSteps.get(0).equals(targetSteps.get(0))) {
- lastEqualStep = (String) sourceSteps.remove(0);
- targetSteps.remove(0);
- }
-
- String prefix = "";
- if (targetSteps.isEmpty()) {
- prefix = generateUpDots(sourceSteps.size());
- } else if (sourceSteps.isEmpty()) {
- prefix = getLastStep(this.requestUrl) + "/";
- } else if (sourceSteps.size() > 1) {
- prefix = generateUpDots(sourceSteps.size() - 1) + "/";
- } else if (sourceSteps.size() == 1 && targetSteps.get(0).equals("")) {
- prefix = generateUpDots(1) + "/" + lastEqualStep + "/";
- }
-
- String[] targetArray = (String[]) targetSteps.toArray(new String[targetSteps.size()]);
- String targetPath = StringUtil.join(targetArray, "/");
- relativeUrl = prefix + targetPath;
- }
- return relativeUrl;
- }
-
- protected String getLastStep(String url) {
- return url.substring(url.lastIndexOf("/") + 1);
- }
-
- protected String generateUpDots(int length) {
- String upDots;
- String[] upDotsArray = new String[length];
- Arrays.fill(upDotsArray, "..");
- upDots = StringUtil.join(upDotsArray, "/");
- return upDots;
- }
-
- protected List toList(String url) {
- return new ArrayList(Arrays.asList(url.substring(1).split("/", -1)));
- }
-
-}
diff --git a/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/linking/impl/GlobalProxiesImpl.java b/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/linking/impl/GlobalProxiesImpl.java
deleted file mode 100644
index 893b9f9..0000000
--- a/org.apache.lenya.core.linking/src/main/java/org/apache/lenya/cms/linking/impl/GlobalProxiesImpl.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.lenya.cms.linking.impl;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.cocoon.processing.ProcessInfoProvider;
-import org.apache.cocoon.spring.configurator.WebAppContextUtils;
-import org.apache.cocoon.util.AbstractLogEnabled;
-import org.apache.lenya.cms.linking.GlobalProxies;
-import org.apache.lenya.cms.publication.Proxy;
-
-/**
- * GlobalProxy service implementation.
- * The class is implemented as a singleton.
- */
-public class GlobalProxiesImpl extends AbstractLogEnabled implements GlobalProxies {
-
- private Map ssl2proxy = new HashMap();
-
- public Proxy getProxy(boolean ssl) {
- Object key = Boolean.valueOf(ssl);
- Proxy proxy = (Proxy) this.ssl2proxy.get(key);
- if (proxy == null) {
- proxy = initializeProxy(key);
- }
- return proxy;
- }
-
- protected synchronized Proxy initializeProxy(Object key) {
- ProcessInfoProvider process = (ProcessInfoProvider) WebAppContextUtils
- .getCurrentWebApplicationContext().getBean(ProcessInfoProvider.ROLE);
- Proxy proxy = new Proxy();
- proxy.setUrl(process.getRequest().getContextPath());
- this.ssl2proxy.put(key, proxy);
- return proxy;
- }
-
- public void setNonSslProxyUrl(String url) {
- Proxy proxy = new Proxy();
- proxy.setUrl(url);
- setProxy(false, proxy);
- }
-
- public void setSslProxyUrl(String url) {
- Proxy proxy = new Proxy();
- proxy.setUrl(url);
- setProxy(true, proxy);
- }
-
- /**
- * @param ssl If the proxy is responsible for SSL requests.
- * @param proxy A proxy.
- */
- public void setProxy(boolean ssl, Proxy proxy) {
- this.ssl2proxy.put(Boolean.valueOf(ssl), proxy);
- }
-
-}