org.apache.commons.httpclient
public class ConnectMethod extends HttpMethodBase
Since: 2.0
Version: $Revision: 483949 $ $Date: 2006-12-08 12:34:50 +0100 (Fri, 08 Dec 2006) $
Field Summary | |
---|---|
static String | NAME the name of this method |
Constructor Summary | |
---|---|
ConnectMethod() | |
ConnectMethod(HttpMethod method) | |
ConnectMethod(HostConfiguration targethost)
Create a connect method.
|
Method Summary | |
---|---|
protected void | addCookieRequestHeader(HttpState state, HttpConnection conn)
This method does nothing. |
protected void | addRequestHeaders(HttpState state, HttpConnection conn)
Populates the request headers map to with additional
headers to be submitted to the given HttpConnection.
|
int | execute(HttpState state, HttpConnection conn)
Execute this method and create a tunneled HttpConnection. |
String | getName()
Provide the name of this method.
|
String | getPath() |
URI | getURI() |
protected boolean | shouldCloseConnection(HttpConnection conn)
Returns true if the status code is anything other than
SC_OK, false otherwise.
|
protected void | writeRequestLine(HttpState state, HttpConnection conn)
Special Connect request.
|
Deprecated: use #ConnectMethod(HttpHost); Create a connect method.
Since: 3.0
Deprecated: the wrapped method is no longer used Create a connect method wrapping the existing method
Parameters: method the method
to execute after connecting
to the server
Since: 3.0
Parameters: state current state of http requests conn the connection to use for I/O
Throws: IOException when errors occur reading or writing to/from the connection HttpException when a recoverable error occurs
See Also: HttpMethodBase
headers
to be submitted to the given HttpConnection.
This implementation adds User-Agent, Host, and Proxy-Authorization headers, when appropriate.
Parameters: state the client state conn the HttpConnection the headers will eventually be written to
Throws: IOException when an error occurs writing the request HttpException when a HTTP protocol error occurs
See Also: ConnectMethod
Parameters: state the current http state conn the connection to write to
Returns: the http status code from execution
Throws: HttpException when an error occurs writing the headers IOException when an error occurs writing the headers
See Also: tunnelCreated
name
of this method.
Returns: the String "CONNECT"
true
if the status code is anything other than
SC_OK, false
otherwise.
Returns: true
if the connection should be closed
See Also: shouldCloseConnection SC_OK
Parameters: state the current http state conn the connection to write to
Throws: IOException when an error occurs writing the request HttpException when an error occurs writing the request