org.apache.commons.httpclient
Class ConnectMethod
- HttpMethod
public class ConnectMethod
Establishes a tunneled HTTP connection via the CONNECT method.
$Revision: 155418 $ $Date: 2005-02-26 08:01:52 -0500 (Sat, 26 Feb 2005) $static String | NAME - the name of this method
|
abort , addCookieRequestHeader , addHostRequestHeader , addProxyConnectionHeader , addRequestHeader , addRequestHeader , addRequestHeaders , addResponseFooter , addUserAgentRequestHeader , checkNotUsed , checkUsed , execute , generateRequestLine , getAuthenticationRealm , getContentCharSet , getDoAuthentication , getEffectiveVersion , getFollowRedirects , getHostAuthState , getHostConfiguration , getMethodRetryHandler , getName , getParams , getPath , getProxyAuthState , getProxyAuthenticationRealm , getQueryString , getRecoverableExceptionCount , getRequestCharSet , getRequestHeader , getRequestHeaderGroup , getRequestHeaders , getRequestHeaders , getResponseBody , getResponseBodyAsStream , getResponseBodyAsString , getResponseCharSet , getResponseContentLength , getResponseFooter , getResponseFooters , getResponseHeader , getResponseHeaderGroup , getResponseHeaders , getResponseHeaders , getResponseStream , getResponseTrailerHeaderGroup , getStatusCode , getStatusLine , getStatusText , getURI , hasBeenUsed , isAborted , isConnectionCloseForced , isHttp11 , isRequestSent , isStrictMode , processResponseBody , processResponseHeaders , processStatusLine , readResponse , readResponseBody , readResponseHeaders , readStatusLine , recycle , releaseConnection , removeRequestHeader , removeRequestHeader , responseBodyConsumed , setConnectionCloseForced , setDoAuthentication , setFollowRedirects , setHostConfiguration , setHttp11 , setMethodRetryHandler , setParams , setPath , setQueryString , setQueryString , setRequestHeader , setRequestHeader , setResponseStream , setStrictMode , setURI , shouldCloseConnection , validate , writeRequest , writeRequestBody , writeRequestHeaders , writeRequestLine |
NAME
public static final String NAME
the name of this method
ConnectMethod
public ConnectMethod()
Create a connect method.
ConnectMethod
public ConnectMethod(HttpMethod method)
the wrapped method is no longer used
Create a connect method wrapping the existing method
method
- the method
to execute after connecting
to the server
execute
public int execute(HttpState state,
HttpConnection conn)
throws IOException,
HttpException
Execute this method and create a tunneled HttpConnection. If the method
is successful (i.e. the status is a 2xx) tunnelCreated() will be called
on the connection.
- execute in interface HttpMethod
- execute in interface HttpMethodBase
state
- the current http stateconn
- the connection to write to
- the http status code from execution
shouldCloseConnection
protected boolean shouldCloseConnection(HttpConnection conn)
Returns true
if the status code is anything other than
SC_OK, false
otherwise.
- shouldCloseConnection in interface HttpMethodBase
true
if the connection should be closed
Copyright (c) 1999-2005 - Apache Software Foundation