org.xins.client
Class XINSCallResult

java.lang.Object
  extended byorg.xins.common.service.CallResult
      extended byorg.xins.client.XINSCallResult
All Implemented Interfaces:
Serializable, XINSCallResultData

public final class XINSCallResult
extends CallResult
implements XINSCallResultData

Successful result of a call to a XINS service. It may be that some targets failed before a target returned a successful result. All the failures are also stored in this object.

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.

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

Method Summary
 DataElement getDataElement()
          Returns the optional extra data.
 String getErrorCode()
          Returns the error code.
 String getParameter(String name)
          Gets the value of the specified parameter.
 PropertyReader getParameters()
          Gets all parameters.
 
Methods inherited from class org.xins.common.service.CallResult
getDuration, getExceptions, getRequest, getSucceededTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getErrorCode

public String getErrorCode()
Returns the error code. If 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.

Specified by:
getErrorCode in interface XINSCallResultData
Returns:
the returned error code, or null if the call was successful.

getParameters

public PropertyReader getParameters()
Gets all parameters.

Specified by:
getParameters in interface XINSCallResultData
Returns:
a PropertyReader with all parameters, or null if there are none.

getParameter

public String getParameter(String name)
                    throws IllegalArgumentException
Gets the value of the specified parameter.

Parameters:
name - the parameter element name, not null.
Returns:
string containing the value of the parameter element, or null if the parameter has no value.
Throws:
IllegalArgumentException - if name == null.

getDataElement

public DataElement getDataElement()
Returns the optional extra data. The data is an XML DataElement, or null.

Specified by:
getDataElement in interface XINSCallResultData
Returns:
the extra data as an XML DataElement, can be null.


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