public class HttpProxyRequest extends ProxyRequest
Modifier and Type | Field and Description |
---|---|
java.lang.String |
httpURI
The HTTP URI.
|
java.lang.String |
httpVerb
The HTTP verb.
|
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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()
Returns the HTTP headers.
|
java.lang.String |
getHost()
Returns the host to which we are connecting.
|
java.lang.String |
getHttpURI()
Returns the request HTTP URI.
|
java.lang.String |
getHttpVerb()
Returns the HTTP request verb.
|
java.lang.String |
getHttpVersion()
Returns the HTTP version.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Returns additional properties for the request.
|
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()
Returns the string representation of the HTTP request .
|
getEndpointAddress
public final java.lang.String httpVerb
public final java.lang.String httpURI
public 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)
public java.util.Map<java.lang.String,java.lang.String> getProperties()
public void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
public void checkRequiredProperties(java.lang.String... propNames) throws ProxyAuthException
ProxyAuthException
.ProxyAuthException
public java.lang.String toHttpString()
Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.