org.xins.client
Class UnacceptableResultXINSCallException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.xins.common.service.CallException
              extended byorg.xins.client.XINSCallException
                  extended byorg.xins.client.UnacceptableResultXINSCallException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
UnacceptableErrorCodeXINSCallException

public class UnacceptableResultXINSCallException
extends XINSCallException

Exception that indicates that an API call returned a result that was considered unacceptable by the application layer.

Note that this exception is not thrown if the result is invalid according to the XINS rules for a result XML document. Only if the result is just invalid in relation to the applicable API specification this exception is thrown.

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

Constructor Summary
UnacceptableResultXINSCallException(AbstractCAPICallResult result, String detail, Throwable cause)
          Constructs a new UnacceptableCallResultException using the specified AbstractCAPICallResult.
UnacceptableResultXINSCallException(XINSCallResult result, String detail, Throwable cause)
          Constructs a new UnacceptableCallResultException using the specified XINSCallResult.
 
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 returned parameter.
 PropertyReader getParameters()
          Gets all returned parameters.
 
Methods inherited from class org.xins.common.service.CallException
getDetail, getDuration, getMessage, getNext, getRequest, getTarget
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnacceptableResultXINSCallException

public UnacceptableResultXINSCallException(XINSCallResult result,
                                           String detail,
                                           Throwable cause)
                                    throws IllegalArgumentException
Constructs a new UnacceptableCallResultException using the specified XINSCallResult.

Parameters:
result - the XINSCallResult that is considered unacceptable, never null.
detail - a detailed description of why the result is considered unacceptable, or null if such a description is not available.
cause - the optional cause exception, or null.
Throws:
IllegalArgumentException - if result == null.

UnacceptableResultXINSCallException

public UnacceptableResultXINSCallException(AbstractCAPICallResult result,
                                           String detail,
                                           Throwable cause)
                                    throws IllegalArgumentException
Constructs a new UnacceptableCallResultException using the specified AbstractCAPICallResult.

Parameters:
result - the AbstractCAPICallResult that is considered unacceptable, never null.
detail - a detailed description of why the result is considered unacceptable, or null if such a description is not available.
cause - the optional cause exception, or null.
Throws:
IllegalArgumentException - if result == null.
Method Detail

getErrorCode

public final String getErrorCode()
Returns the error code.

Returns:
the error code or null if the call was successful and no error code was returned.

getParameters

public final PropertyReader getParameters()
Gets all returned parameters.

Returns:
a PropertyReader containing all parameters, or null if there are none.

getParameter

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

Parameters:
name - the parameter name, not null.
Returns:
the value of the parameter, not null.
Throws:
IllegalArgumentException - if name == null.

getDataElement

public final DataElement getDataElement()
Returns the optional extra data.

Returns:
the extra data as a DataElement, can be null;


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