org.xins.common.http
Class HTTPCallRequest

java.lang.Object
  extended byorg.xins.common.service.CallRequest
      extended byorg.xins.common.http.HTTPCallRequest
All Implemented Interfaces:
Serializable

public final class HTTPCallRequest
extends CallRequest

A request towards an HTTP service.

Since XINS 1.1.0, an HTTP method is not a mandatory property anymore. If the HTTP method is not specified in a request, then it will from the applicable HTTPCallConfig.

Since:
XINS 1.0.0
Version:
$Revision: 1.23 $ $Date: 2006/08/28 09:12:31 $
Author:
Ernst de Haan
See Also:
HTTPServiceCaller, Serialized Form

Constructor Summary
HTTPCallRequest()
          Constructs a new HTTPCallRequest with no parameters.
HTTPCallRequest(HTTPMethod method)
          Deprecated. Deprecated since XINS 1.1.0. Use HTTPCallRequest(PropertyReader) instead, in combination with setHTTPCallConfig(HTTPCallConfig). This constructor is guaranteed not to be removed before XINS 2.0.0.
HTTPCallRequest(HTTPMethod method, PropertyReader parameters)
          Deprecated. Deprecated since XINS 1.1.0. Use HTTPCallRequest(PropertyReader) instead, in combination with setHTTPCallConfig(HTTPCallConfig). This constructor is guaranteed not to be removed before XINS 2.0.0.
HTTPCallRequest(HTTPMethod method, PropertyReader parameters, boolean failOverAllowed, HTTPStatusCodeVerifier statusCodeVerifier)
          Deprecated. Deprecated since XINS 1.1.0. Use HTTPCallRequest(PropertyReader,HTTPStatusCodeVerifier) instead, in combination with setHTTPCallConfig(HTTPCallConfig). This constructor is guaranteed not to be removed before XINS 2.0.0.
HTTPCallRequest(PropertyReader parameters)
          Constructs a new HTTPCallRequest with the specified parameters.
HTTPCallRequest(PropertyReader parameters, HTTPStatusCodeVerifier statusCodeVerifier)
          Constructs a new HTTPCallRequest with the specified parameters and status code verifier.
 
Method Summary
 String describe()
          Describes this request.
 HTTPCallConfig getHTTPCallConfig()
          Returns the HTTP call configuration.
 HTTPMethod getMethod()
          Deprecated. Deprecated since XINS 1.1.0. Use getHTTPCallConfig() instead. This method is guaranteed not to be removed before XINS 2.0.0.
 PropertyReader getParameters()
          Returns the parameters associated with this call request.
 HTTPStatusCodeVerifier getStatusCodeVerifier()
          Returns the HTTP status code verifier.
 boolean isFailOverAllowed()
          Determines whether fail-over is in principle allowed, even if the request was already sent to the other end.
 void setHTTPCallConfig(HTTPCallConfig callConfig)
          Sets the associated HTTP call configuration.
 
Methods inherited from class org.xins.common.service.CallRequest
getCallConfig, setCallConfig, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HTTPCallRequest

public HTTPCallRequest(PropertyReader parameters,
                       HTTPStatusCodeVerifier statusCodeVerifier)
Constructs a new HTTPCallRequest with the specified parameters and status code verifier.

Parameters:
parameters - the parameters for the HTTP call, can be null if there are none to pass down.
statusCodeVerifier - the HTTP status code verifier, or null if all HTTP status codes are allowed.
Since:
XINS 1.1.0

HTTPCallRequest

public HTTPCallRequest(PropertyReader parameters)
Constructs a new HTTPCallRequest with the specified parameters.

Parameters:
parameters - the parameters for the HTTP call, can be null if there are none to pass down.
Since:
XINS 1.1.0

HTTPCallRequest

public HTTPCallRequest()
Constructs a new HTTPCallRequest with no parameters.

Since:
XINS 1.1.0

HTTPCallRequest

public HTTPCallRequest(HTTPMethod method)
Deprecated. Deprecated since XINS 1.1.0. Use HTTPCallRequest(PropertyReader) instead, in combination with setHTTPCallConfig(HTTPCallConfig). This constructor is guaranteed not to be removed before XINS 2.0.0.

Constructs a new HTTPCallRequest with the specified HTTP method. No arguments are be passed to the URL. Fail-over is disallowed, unless the request was definitely not processed by the other end.

Parameters:
method - the HTTP method to use, or null if the method should be determined when the call is made (since XINS 1.1.0 this argument can be null).

HTTPCallRequest

public HTTPCallRequest(HTTPMethod method,
                       PropertyReader parameters)
Deprecated. Deprecated since XINS 1.1.0. Use HTTPCallRequest(PropertyReader) instead, in combination with setHTTPCallConfig(HTTPCallConfig). This constructor is guaranteed not to be removed before XINS 2.0.0.

Constructs a new HTTPCallRequest with the specified HTTP method and parameters. Fail-over is disallowed, unless the request was definitely not processed by the other end.

Parameters:
method - the HTTP method to use, or null if the method should be determined when the call is made (since XINS 1.1.0 this argument can be null).
parameters - the parameters for the HTTP call, can be null.

HTTPCallRequest

public HTTPCallRequest(HTTPMethod method,
                       PropertyReader parameters,
                       boolean failOverAllowed,
                       HTTPStatusCodeVerifier statusCodeVerifier)
Deprecated. Deprecated since XINS 1.1.0. Use HTTPCallRequest(PropertyReader,HTTPStatusCodeVerifier) instead, in combination with setHTTPCallConfig(HTTPCallConfig). This constructor is guaranteed not to be removed before XINS 2.0.0.

Constructs a new HTTPCallRequest with the specified HTTP method, parameters and status code verifier, optionally allowing fail-over in all cases.

Parameters:
method - the HTTP method to use, or null if the method should be determined when the call is made (since XINS 1.1.0 this argument can be null).
parameters - the parameters for the HTTP call, can be null.
failOverAllowed - flag that indicates whether fail-over is in principle allowed, even if the request was already sent to the other end.
statusCodeVerifier - the HTTP status code verifier, or null if all HTTP status codes are allowed.
Method Detail

describe

public String describe()
Describes this request.

Specified by:
describe in class CallRequest
Returns:
the description of this request, never null.

getHTTPCallConfig

public HTTPCallConfig getHTTPCallConfig()
Returns the HTTP call configuration.

Returns:
the HTTP call configuration object, or null.
Since:
XINS 1.1.0

setHTTPCallConfig

public void setHTTPCallConfig(HTTPCallConfig callConfig)
Sets the associated HTTP call configuration.

Parameters:
callConfig - the HTTP call configuration object to associate with this request, or null.
Since:
XINS 1.1.0

getMethod

public HTTPMethod getMethod()
Deprecated. Deprecated since XINS 1.1.0. Use getHTTPCallConfig() instead. This method is guaranteed not to be removed before XINS 2.0.0.

Returns the HTTP method associated with this call request.

Since XINS 1.1.0, this method may return null.

Returns:
the HTTP method, or null.

getParameters

public PropertyReader getParameters()
Returns the parameters associated with this call request.

Since XINS 1.1.0, this method will never return null.

Returns:
the parameters, never null.

isFailOverAllowed

public boolean isFailOverAllowed()
Determines whether fail-over is in principle allowed, even if the request was already sent to the other end.

Returns:
true if fail-over is in principle allowed, even if the request was already sent to the other end, false otherwise.

getStatusCodeVerifier

public HTTPStatusCodeVerifier getStatusCodeVerifier()
Returns the HTTP status code verifier. If all HTTP status codes are allowed, then null is returned.

Returns:
the HTTP status code verifier, or null.


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