public final class XINSCallRequest extends CallRequest
Note that instances of this class are not thread-safe.
XINSServiceCaller
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
PARAMETER_NAME_PATTERN_STRING
The pattern for a parameter name, as a character string.
|
Constructor and Description |
---|
XINSCallRequest(String functionName)
Constructs a new
XINSCallRequest for the specified function
with no parameters, disallowing fail-over unless the request was
definitely not (yet) accepted by the service. |
XINSCallRequest(String functionName,
Map<String,String> parameters)
Constructs a new
XINSCallRequest for the specified function
and parameters, disallowing fail-over unless the request was definitely
not (yet) accepted by the service. |
XINSCallRequest(String functionName,
Map<String,String> parameters,
boolean failOverAllowed)
Constructs a new
XINSCallRequest for the specified function
and parameters, possibly allowing fail-over even if the request was
possibly already received by a target service. |
XINSCallRequest(String functionName,
Map<String,String> parameters,
boolean failOverAllowed,
HTTPMethod method)
Constructs a new
XINSCallRequest for the specified function
and parameters, possibly allowing fail-over, optionally specifying the
HTTP method to use. |
XINSCallRequest(String functionName,
Map<String,String> parameters,
Element dataSection)
Constructs a new
XINSCallRequest for the specified function
and parameters, disallowing fail-over unless the request was definitely
not (yet) accepted by the service. |
Modifier and Type | Method and Description |
---|---|
String |
describe()
Describes this request.
|
Element |
getDataSection()
Retrieves the data section for the input.
|
String |
getFunctionName()
Returns the name of the function to call.
|
String |
getParameter(String name)
Gets the value of the specified parameter.
|
Map<String,String> |
getParameters()
Gets all parameters to pass with the call, with their respective values.
|
XINSCallConfig |
getXINSCallConfig()
Returns the XINS call configuration.
|
void |
setDataSection(Element dataSection)
Sets the data section for the input.
|
void |
setParameter(String name,
String value)
Sets the parameter with the specified name.
|
void |
setParameters(Map<String,String> parameters)
Sets the parameters for this function, replacing any existing
parameters.
|
void |
setXINSCallConfig(XINSCallConfig callConfig)
Sets the associated XINS call configuration.
|
getCallConfig, setCallConfig, toString
public static final String PARAMETER_NAME_PATTERN_STRING
public XINSCallRequest(String functionName) throws IllegalArgumentException
XINSCallRequest
for the specified function
with no parameters, disallowing fail-over unless the request was
definitely not (yet) accepted by the service.functionName
- the name of the function to call, cannot be null
.IllegalArgumentException
- if functionName == null
.public XINSCallRequest(String functionName, Map<String,String> parameters) throws IllegalArgumentException
XINSCallRequest
for the specified function
and parameters, disallowing fail-over unless the request was definitely
not (yet) accepted by the service.functionName
- the name of the function to call, cannot be null
.parameters
- the input parameters, if any, can be null
if there are
none.IllegalArgumentException
- if functionName == null
.public XINSCallRequest(String functionName, Map<String,String> parameters, Element dataSection) throws IllegalArgumentException
XINSCallRequest
for the specified function
and parameters, disallowing fail-over unless the request was definitely
not (yet) accepted by the service.functionName
- the name of the function to call, cannot be null
.parameters
- the input parameters, if any, can be null
if there are
none.dataSection
- the data section for the input, if any, can be null
if
there are none.IllegalArgumentException
- if functionName == null
.public XINSCallRequest(String functionName, Map<String,String> parameters, boolean failOverAllowed) throws IllegalArgumentException
XINSCallRequest
for the specified function
and parameters, possibly allowing fail-over even if the request was
possibly already received by a target service.functionName
- the name of the function to call, cannot be null
.parameters
- the input parameters, if any, can be null
if there are
none.failOverAllowed
- flag that indicates whether fail-over is in principle allowed, even
if the request was already sent to the other end.IllegalArgumentException
- if functionName == null
.public XINSCallRequest(String functionName, Map<String,String> parameters, boolean failOverAllowed, HTTPMethod method) throws IllegalArgumentException
XINSCallRequest
for the specified function
and parameters, possibly allowing fail-over, optionally specifying the
HTTP method to use.functionName
- the name of the function to call, cannot be null
.parameters
- the input parameters, if any, can be null
if there are
none.failOverAllowed
- flag that indicates whether fail-over is in principle allowed, even
if the request was already sent to the other end.method
- the HTTP method to use, or null
if a default should be
used.IllegalArgumentException
- if functionName == null
or if parameters
contains a name that does not match the constraints for a parameter
name, see PARAMETER_NAME_PATTERN_STRING
or if it equals
"function"
, which is currently still reserved.public String describe()
describe
in class CallRequest
null
.public XINSCallConfig getXINSCallConfig()
null
.public void setXINSCallConfig(XINSCallConfig callConfig)
callConfig
- the XINS call configuration object to associate with this request, or
null
.public String getFunctionName()
null
.public void setParameters(Map<String,String> parameters) throws IllegalArgumentException
parameters
- the input parameters, if any, can be null
if there are
none.IllegalArgumentException
- if parameters
contains a name that does not match the
constraints for a parameter name, see
PARAMETER_NAME_PATTERN_STRING
or if it equals
"function"
, which is currently still reserved.public void setParameter(String name, String value) throws IllegalArgumentException
name
- the parameter name, cannot be null
.value
- the new value for the parameter, can be null
.IllegalArgumentException
- if name
does not match the constraints for a parameter
name, see PARAMETER_NAME_PATTERN_STRING
or if it equals
"function"
, which is currently still reserved.public Map<String,String> getParameters()
null
if there are none.public String getParameter(String name) throws IllegalArgumentException
name
- the parameter name, not null
.null
.IllegalArgumentException
- if name == null
.public void setDataSection(Element dataSection)
dataSection
- the data section for the input, or null
if there is
none.public Element getDataSection()
null
if there is
none.See http://www.xins.org/.