public class HttpProxyRequest extends ProxyRequest
| 构造器和说明 |
|---|
HttpProxyRequest(java.net.InetSocketAddress endpointAddress)
Constructor which creates a HTTP/1.0 CONNECT request to the specified
endpoint.
|
HttpProxyRequest(java.net.InetSocketAddress endpointAddress,
java.lang.String httpVersion)
Constructor which creates a CONNECT request to the specified endpoint
using the provided protocol version.
|
HttpProxyRequest(java.net.InetSocketAddress endpointAddress,
java.lang.String httpVersion,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
Constructor which creates a CONNECT request to the specified endpoint
using the provided protocol version and setting the requested headers.
|
HttpProxyRequest(java.lang.String httpURI)
Constructor which creates a HTTP/1.0 GET request to the specified
http URI.
|
HttpProxyRequest(java.lang.String httpURI,
java.lang.String httpVersion)
Constructor which creates a GET request to the specified http URI
using the provided protocol version
|
HttpProxyRequest(java.lang.String httpVerb,
java.lang.String httpURI,
java.lang.String httpVersion)
Constructor which creates a request using the provided HTTP verb targeted at
the specified http URI using the provided protocol version.
|
HttpProxyRequest(java.lang.String httpVerb,
java.lang.String httpURI,
java.lang.String httpVersion,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
Constructor which creates a request using the provided HTTP verb targeted at
the specified http URI using the provided protocol version and setting the
requested headers.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
checkRequiredProperties(java.lang.String... propNames)
Check if the given property(ies) is(are) set.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getHeaders() |
java.lang.String |
getHost() |
java.lang.String |
getHttpURI() |
java.lang.String |
getHttpVerb() |
java.lang.String |
getHttpVersion() |
java.util.Map<java.lang.String,java.lang.String> |
getProperties() |
void |
setHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
Set the HTTP headers.
|
void |
setHttpVersion(java.lang.String httpVersion)
Sets the HTTP version.
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Set additional properties for the request.
|
java.lang.String |
toHttpString() |
getEndpointAddresspublic HttpProxyRequest(java.net.InetSocketAddress endpointAddress)
endpointAddress - the endpoint to connect topublic HttpProxyRequest(java.net.InetSocketAddress endpointAddress,
java.lang.String httpVersion)
endpointAddress - the endpoint to connect tohttpVersion - the HTTP protocol versionpublic HttpProxyRequest(java.net.InetSocketAddress endpointAddress,
java.lang.String httpVersion,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
endpointAddress - the endpoint to connect tohttpVersion - the HTTP protocol versionheaders - the additionnal http headerspublic HttpProxyRequest(java.lang.String httpURI)
httpURI - the target URIpublic HttpProxyRequest(java.lang.String httpURI,
java.lang.String httpVersion)
httpURI - the target URIhttpVersion - the HTTP protocol versionpublic HttpProxyRequest(java.lang.String httpVerb,
java.lang.String httpURI,
java.lang.String httpVersion)
httpVerb - the HTTP verb to usehttpURI - the target URIhttpVersion - the HTTP protocol versionpublic HttpProxyRequest(java.lang.String httpVerb,
java.lang.String httpURI,
java.lang.String httpVersion,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
httpVerb - the HTTP verb to usehttpURI - the target URIhttpVersion - the HTTP protocol versionheaders - the additional http headerspublic final java.lang.String getHttpVerb()
public java.lang.String getHttpVersion()
public void setHttpVersion(java.lang.String httpVersion)
httpVersion - the HTTP protocol versionpublic final java.lang.String getHost()
public final java.lang.String getHttpURI()
public final java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders()
public final void setHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
headers - The HTTP headers to setpublic java.util.Map<java.lang.String,java.lang.String> getProperties()
public void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
properties - The properties to add to the reqyestpublic void checkRequiredProperties(java.lang.String... propNames)
throws ProxyAuthException
ProxyAuthException.propNames - The list of property name to checkProxyAuthException - If we get an error during the proxy authenticationpublic java.lang.String toHttpString()