public final class HTTPCallConfig extends CallConfig
This class is not thread safe.
| Constructor and Description |
|---|
HTTPCallConfig()
Constructs a new
HTTPCallConfig object. |
| Modifier and Type | Method and Description |
|---|---|
String |
describe()
Describes this configuration.
|
boolean |
getFollowRedirect()
Returns the action performed when a redirect is returned from the server.
|
HttpClient |
getHttpClient()
Gets the HttpClient to use to call the URL.
|
HTTPMethod |
getMethod()
Returns the HTTP method associated with this configuration.
|
String |
getUserAgent()
Returns the HTTP user agent associated with the HTTP call.
|
void |
setFollowRedirect(boolean follow)
Sets the action to perform if a redirect is returned from the server.
|
void |
setHttpClient(HttpClient httpClient)
Sets the HttpClient to use to call the URL.
|
void |
setMethod(HTTPMethod method)
Sets the HTTP method associated with this configuration.
|
void |
setUserAgent(String agent)
Sets the user agent associated with the HTTP call.
|
isFailOverAllowed, setFailOverAllowed, toStringpublic HTTPMethod getMethod()
null.public void setMethod(HTTPMethod method) throws IllegalArgumentException
method - the HTTP method to be associated with this configuration, cannot be
null.IllegalArgumentException - if method == null.public boolean getFollowRedirect()
true if it should call the redirected link,
false if it should fail.public void setFollowRedirect(boolean follow)
follow - true if it should call the redirected link,
false if it should fail.public void setUserAgent(String agent)
agent - the HTTP user agent, or null if no user-agent header
should be sent.public String getUserAgent()
null no user agent has been
specified.public HttpClient getHttpClient()
null.public void setHttpClient(HttpClient httpClient)
httpClient - the http client, can be null.public String describe()
describe in class CallConfignull, should never be empty and should never start or
end with whitespace characters.See http://www.xins.org/.