org.apache.http.impl
Class DefaultHttpProxyConnection
java.lang.Object
org.apache.http.impl.AbstractHttpConnection
org.apache.http.impl.DefaultHttpClientConnection
org.apache.http.impl.DefaultHttpProxyConnection
- All Implemented Interfaces:
- HttpClientConnection, HttpConnection, HttpProxyConnection
public class DefaultHttpProxyConnection
- extends DefaultHttpClientConnection
- implements HttpProxyConnection
Default implementation of a client-side connection through a proxy.
- Since:
- 4.0
- Version:
- $Revision: 376961 $
- Author:
- Oleg Kalnichevski
Method Summary |
void |
close()
This method will gracefully close the connection. |
HttpHost |
getTunnelTarget()
Returns the target host as provided by |
boolean |
isSecure()
Checks if the tunnel uses a secure socket. |
boolean |
isTunnelActive()
Checks if |
void |
tunnelTo(HttpHost targetHost,
HttpParams params)
After this connection is opened to the proxy, this method may be called
to create a new connection over it. |
Methods inherited from class org.apache.http.impl.DefaultHttpClientConnection |
flush, getLocalAddress, getTargetHost, isResponseAvailable, open, readResponseHeaders, readResponseStatusLine, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader, sendRequestHeaders, sendRequestLine, setEntityDeserializer, setEntitySerializer, setLocalAddress, setResponseFactory, setTargetHost |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.http.HttpClientConnection |
flush, getLocalAddress, getTargetHost, isResponseAvailable, open, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader, setLocalAddress, setTargetHost |
DefaultHttpProxyConnection
public DefaultHttpProxyConnection(ProxyHost proxyhost,
java.net.InetAddress localAddress)
DefaultHttpProxyConnection
public DefaultHttpProxyConnection(ProxyHost proxyhost)
close
public void close()
throws java.io.IOException
- Description copied from interface:
HttpConnection
- This method will gracefully close the connection. It will attempt to
flush the transmitter's internal buffer prior to closing the underlying
socket. This method MAY NOT be called from a different thread to force
shutdown the connection. Use #shutdown() instead.
- Specified by:
close
in interface HttpConnection
- Overrides:
close
in class AbstractHttpConnection
- Throws:
java.io.IOException
- See Also:
HttpConnection.shutdown()
tunnelTo
public void tunnelTo(HttpHost targetHost,
HttpParams params)
throws java.io.IOException
- Description copied from interface:
HttpProxyConnection
- After this connection is opened to the proxy, this method may be called
to create a new connection over it. Subsequent data is sent over the
resulting connection.
- Specified by:
tunnelTo
in interface HttpProxyConnection
- Parameters:
targetHost
- The final target hostparams
- The parameters effective for this connection
- Throws:
java.io.IOException
getTunnelTarget
public HttpHost getTunnelTarget()
- Description copied from interface:
HttpProxyConnection
- Returns the target host as provided by
- Specified by:
getTunnelTarget
in interface HttpProxyConnection
isTunnelActive
public boolean isTunnelActive()
- Description copied from interface:
HttpProxyConnection
- Checks if
- Specified by:
isTunnelActive
in interface HttpProxyConnection
- Returns:
- true if tunnelTo has been called, false if not
isSecure
public boolean isSecure()
- Description copied from interface:
HttpProxyConnection
- Checks if the tunnel uses a secure socket.
- Specified by:
isSecure
in interface HttpProxyConnection
- Returns:
- true if this is a secure tunnel.
Copyright 2005-2005-2006 Apache Software Foundation. All Rights Reserved.