Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.http.impl
Class DefaultHttpProxyConnection  view DefaultHttpProxyConnection download DefaultHttpProxyConnection.java

java.lang.Object
  extended byorg.apache.http.impl.AbstractHttpConnection
      extended byorg.apache.http.impl.DefaultHttpClientConnection
          extended byorg.apache.http.impl.DefaultHttpProxyConnection
All Implemented Interfaces:
org.apache.http.HttpClientConnection, org.apache.http.HttpConnection, org.apache.http.HttpProxyConnection

public class DefaultHttpProxyConnection
extends DefaultHttpClientConnection
implements org.apache.http.HttpProxyConnection

Default implementation of a client-side connection through a proxy.

Since:
4.0
Version:
$Revision: 376961 $

Field Summary
private  boolean secure
           
private  org.apache.http.HttpHost tunneltarget
           
 
Fields inherited from class org.apache.http.impl.DefaultHttpClientConnection
datareceiver, datatransmitter, open, socket
 
Constructor Summary
DefaultHttpProxyConnection(org.apache.http.ProxyHost proxyhost)
           
DefaultHttpProxyConnection(org.apache.http.ProxyHost proxyhost, java.net.InetAddress localAddress)
           
 
Method Summary
 void close()
          This method will gracefully close the connection.
 org.apache.http.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(org.apache.http.HttpHost targetHost, org.apache.http.params.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
assertNotOpen, assertOpen, bind, flush, getLocalAddress, getTargetHost, isOpen, isResponseAvailable, isStale, open, readResponseHeaders, readResponseStatusLine, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader, sendRequestHeaders, sendRequestLine, setEntityDeserializer, setEntitySerializer, setLocalAddress, setReceiverFactory, setResponseFactory, setTargetHost, setTransmitterFactory, shutdown
 
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
 
Methods inherited from interface org.apache.http.HttpConnection
isOpen, isStale, shutdown
 

Field Detail

tunneltarget

private volatile org.apache.http.HttpHost tunneltarget

secure

private volatile boolean secure
Constructor Detail

DefaultHttpProxyConnection

public DefaultHttpProxyConnection(org.apache.http.ProxyHost proxyhost,
                                  java.net.InetAddress localAddress)

DefaultHttpProxyConnection

public DefaultHttpProxyConnection(org.apache.http.ProxyHost proxyhost)
Method Detail

close

public void close()
           throws java.io.IOException
Description copied from interface: org.apache.http.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 org.apache.http.HttpConnection
Overrides:
close in class AbstractHttpConnection

tunnelTo

public void tunnelTo(org.apache.http.HttpHost targetHost,
                     org.apache.http.params.HttpParams params)
              throws java.io.IOException
Description copied from interface: org.apache.http.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 org.apache.http.HttpProxyConnection

getTunnelTarget

public org.apache.http.HttpHost getTunnelTarget()
Description copied from interface: org.apache.http.HttpProxyConnection
Returns the target host as provided by

Specified by:
getTunnelTarget in interface org.apache.http.HttpProxyConnection

isTunnelActive

public boolean isTunnelActive()
Description copied from interface: org.apache.http.HttpProxyConnection
Checks if

Specified by:
isTunnelActive in interface org.apache.http.HttpProxyConnection

isSecure

public boolean isSecure()
Description copied from interface: org.apache.http.HttpProxyConnection
Checks if the tunnel uses a secure socket.

Specified by:
isSecure in interface org.apache.http.HttpProxyConnection