1937 proxyAuthentication.removeFromCache();
1938 }
1939 }
1940 proxyAuthentication = getHttpProxyAuthentication(auth);
1941 currentProxyCredentials = proxyAuthentication;
1942 return proxyAuthentication;
1943 }
1944
1945 /**
1946 * Returns the tunnel state.
1947 *
1948 * @return the state
1949 */
1950 TunnelState tunnelState() {
1951 return tunnelState;
1952 }
1953
1954 /**
1955 * Set the tunneling status.
1956 *
1957 * @param the state
1958 */
1959 public void setTunnelState(TunnelState tunnelState) {
1960 this.tunnelState = tunnelState;
1961 }
1962
1963 /**
1964 * establish a tunnel through proxy server
1965 */
1966 public synchronized void doTunneling() throws IOException {
1967 int retryTunnel = 0;
1968 String statusLine = "";
1969 int respCode = 0;
1970 AuthenticationInfo proxyAuthentication = null;
1971 String proxyHost = null;
1972 int proxyPort = -1;
1973
1974 // save current requests so that they can be restored after tunnel is setup.
1975 MessageHeader savedRequests = requests;
1976 requests = new MessageHeader();
1977
|
1937 proxyAuthentication.removeFromCache();
1938 }
1939 }
1940 proxyAuthentication = getHttpProxyAuthentication(auth);
1941 currentProxyCredentials = proxyAuthentication;
1942 return proxyAuthentication;
1943 }
1944
1945 /**
1946 * Returns the tunnel state.
1947 *
1948 * @return the state
1949 */
1950 TunnelState tunnelState() {
1951 return tunnelState;
1952 }
1953
1954 /**
1955 * Set the tunneling status.
1956 *
1957 * @param tunnelState the state
1958 */
1959 public void setTunnelState(TunnelState tunnelState) {
1960 this.tunnelState = tunnelState;
1961 }
1962
1963 /**
1964 * establish a tunnel through proxy server
1965 */
1966 public synchronized void doTunneling() throws IOException {
1967 int retryTunnel = 0;
1968 String statusLine = "";
1969 int respCode = 0;
1970 AuthenticationInfo proxyAuthentication = null;
1971 String proxyHost = null;
1972 int proxyPort = -1;
1973
1974 // save current requests so that they can be restored after tunnel is setup.
1975 MessageHeader savedRequests = requests;
1976 requests = new MessageHeader();
1977
|