|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.commons.httpclient.HttpMethodBase
org.apache.commons.httpclient.ConnectMethod
public class ConnectMethod
Establishes a tunneled HTTP connection via the CONNECT method.
| Field Summary | |
|---|---|
static String |
NAME
the name of this method |
| Constructor Summary | |
|---|---|
ConnectMethod()
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. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NAME
| Constructor Detail |
|---|
public ConnectMethod()
| Method Detail |
|---|
public String getName()
name of this method.
getName in interface HttpMethodgetName in class HttpMethodBase
protected void addCookieRequestHeader(HttpState state,
HttpConnection conn)
addCookieRequestHeader in class HttpMethodBasestate - current state of http requestsconn - the connection to use for I/OHttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection)
protected void addRequestHeaders(HttpState state,
HttpConnection conn)
headers to be submitted to the given HttpConnection.
This implementation adds User-Agent, Host, and Proxy-Authorization headers, when appropriate.
addRequestHeaders in class HttpMethodBasestate - the client stateconn - the HttpConnection the headers will eventually be
written toHttpMethodBase.writeRequestHeaders(org.apache.commons.httpclient.HttpState, org.apache.commons.httpclient.HttpConnection)
public int execute(HttpState state,
HttpConnection conn)
throws IOException,
HttpException
execute in interface HttpMethodexecute in class HttpMethodBasestate - the current http stateconn - the connection to write to
HttpException - when an error occurs writing the headers
IOException - when an error occurs writing the headersHttpConnection.tunnelCreated()
protected void writeRequestLine(HttpState state,
HttpConnection conn)
throws IOException,
HttpException
writeRequestLine in class HttpMethodBasestate - the current http stateconn - the connection to write to
IOException - when an error occurs writing the request
HttpException - when an error occurs writing the requestHttpMethodBase.generateRequestLine(org.apache.commons.httpclient.HttpConnection, java.lang.String, java.lang.String, java.lang.String, java.lang.String)protected boolean shouldCloseConnection(HttpConnection conn)
true if the status code is anything other than
SC_OK, false otherwise.
shouldCloseConnection in class HttpMethodBaseconn - the connection in question
true if the connection should be closedHttpMethodBase.shouldCloseConnection(HttpConnection),
HttpStatus.SC_OK
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||