public final class XINSCallResult extends CallResult implements XINSCallResultData
When a XINSCallResult
instance is created, information must
be passed both about the successful call (which target successfully
returned a result, how long did it take, what was the result) and about the
unsuccessful calls (to which targets were they, what was the error, etc.)
While a XINSCallResultData
object describes the result of a call
to an single target, a XINSCallResultData
also describes all
failed calls that happened before.
Modifier and Type | Method and Description |
---|---|
Element |
getDataElement()
Returns the optional extra data.
|
String |
getErrorCode()
Returns the error code.
|
String |
getParameter(String name)
Gets the value of the specified parameter.
|
Map<String,String> |
getParameters()
Gets all parameters.
|
boolean |
isNotModified()
Returns whether the result was a not modified result.
|
getDuration, getExceptions, getRequest, getSucceededTarget
public String getErrorCode()
null
is returned the call was
successful and thus no error code was returned. Otherwise the call was
unsuccessful.
This method will never return an empty string, so if the result is
not null
, then it is safe to assume the length of the
string is at least 1 character.
getErrorCode
in interface XINSCallResultData
null
if the call was successful.public Map<String,String> getParameters()
getParameters
in interface XINSCallResultData
Map
with all parameters, or null
if there are none.public String getParameter(String name) throws IllegalArgumentException
name
- the parameter element name, not null
.null
if the parameter has no value.IllegalArgumentException
- if name == null
.public Element getDataElement()
Element
,
or null
.getDataElement
in interface XINSCallResultData
Element
, can be null
.public boolean isNotModified()
true
if not modified was returned from the server,
false
if a result with data was returned from the server.See http://www.xins.org/.