001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017 package org.apache.servicemix.http;
018
019 /**
020 * This class contains all parameters needed to send http requests through a proxy
021 *
022 * @author Fabrice Dewasmes
023 * @org.apache.xbean.XBean description="parameters needed to send HTTP requests through a proxy"
024 */
025 public class ProxyParameters {
026
027 protected String proxyHost;
028 protected int proxyPort;
029 protected BasicAuthCredentials proxyCredentials;
030
031 /**
032 * @return Returns the proxyCredentials.
033 */
034 public BasicAuthCredentials getProxyCredentials() {
035 return this.proxyCredentials;
036 }
037
038 /**
039 * Sets the authentication data used for the proxy using basic authentication.
040 *
041 * @param proxyCredentials the <code>BasicAuthCredentials</code> that
042 * will be used for authentication
043 * @org.apache.xbean.Property description="authentication data for using basic HTTP authentication."
044 */
045 public void setProxyCredentials(BasicAuthCredentials proxyCredentials) {
046 this.proxyCredentials = proxyCredentials;
047 }
048
049 /**
050 * Proxy Host through which every http call are emitted
051 *
052 * @return Returns the proxyHost.
053 */
054 public String getProxyHost() {
055 return this.proxyHost;
056 }
057
058 /**
059 * @param proxyHost
060 * The proxy host name to set.
061 * @org.apache.xbean.Property description="the proxy's host name"
062 */
063 public void setProxyHost(String proxyHost) {
064 this.proxyHost = proxyHost;
065 }
066
067 /**
068 * Proxy Port for the proxy host specified
069 *
070 * @return Returns the proxyPort.
071 */
072 public int getProxyPort() {
073 return this.proxyPort;
074 }
075
076 /**
077 * @param proxyPort
078 * The ProxyPort to set.
079 * @org.apache.xbean.Property description="the proxy's port number"
080 */
081 public void setProxyPort(int proxyPort) {
082 this.proxyPort = proxyPort;
083 }
084 }