org.xins.common.http
Class HTTPCallConfig

java.lang.Object
  extended byorg.xins.common.service.CallConfig
      extended byorg.xins.common.http.HTTPCallConfig
All Implemented Interfaces:
Serializable

public final class HTTPCallConfig
extends CallConfig

Call configuration for the HTTP service caller. The HTTP method and the User-Agent string can be configured. By default the HTTP method is POST and the no User-Agent string is set.

Since:
XINS 1.1.0
Version:
$Revision: 1.15 $ $Date: 2006/08/28 09:12:31 $
Author:
Ernst de Haan
See Also:
Serialized Form

Constructor Summary
HTTPCallConfig()
          Constructs a new HTTPCallConfig object.
 
Method Summary
 String describe()
          Describes this configuration.
 HTTPMethod getMethod()
          Returns the HTTP method associated with this configuration.
 String getUserAgent()
          Returns the HTTP user agent associated with the HTTP call.
 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.
 
Methods inherited from class org.xins.common.service.CallConfig
getLock, isFailOverAllowed, setFailOverAllowed, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HTTPCallConfig

public HTTPCallConfig()
Constructs a new HTTPCallConfig object.

Method Detail

getMethod

public HTTPMethod getMethod()
Returns the HTTP method associated with this configuration.

Returns:
the HTTP method, never null.

setMethod

public void setMethod(HTTPMethod method)
               throws IllegalArgumentException
Sets the HTTP method associated with this configuration.

Parameters:
method - the HTTP method to be associated with this configuration, cannot be null.
Throws:
IllegalArgumentException - if method == null.

setUserAgent

public void setUserAgent(String agent)
Sets the user agent associated with the HTTP call.

Parameters:
agent - the HTTP user agent, or null if no user-agent header should be sent.
Since:
XINS 1.3.0

getUserAgent

public String getUserAgent()
Returns the HTTP user agent associated with the HTTP call.

Returns:
the HTTP user agent or null no user agent has been specified.
Since:
XINS 1.3.0

describe

public String describe()
Describes this configuration.

Overrides:
describe in class CallConfig
Returns:
the description of this configuration, should never be null, should never be empty and should never start or end with whitespace characters.


See http://www.xins.org/.