public class PreRateException extends OperationFailureException
PreRateOp execution.
invalidReservationUID error
occurs when the identifier is null.invalidTTL error is related to the ttl that can not be
negative.invalidDefaultResolution error occurs when the default
resolution passed into the PreRateOp is invalid
(null or unknown).invalidResultType occurs when the result type is unknown.The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="preRateFault">
<xs:complexType>
<xs:attribute name="reason" type="PreRateFaultType"/>
<xs:attribute name="message" type="xs:string"/>
</xs:complexType>
</xs:element><xs:simpleType name="PreRateFaultType">
<xs:restriction base="xs:string">
<xs:enumeration value="invalidReservationUID"/>
<xs:enumeration value="invalidTTL"/>
<xs:enumeration value="invalidDefaultResolution"/>
<xs:enumeration value="invalidResultType"/>
</xs:restriction>
</xs:simpleType>
| Modifier and Type | Field and Description |
|---|---|
static int |
INVALID_DEFAULT_RESOLUTION
Constant for
invalidDefaultResolution error. |
static int |
INVALID_RESERVATION_UID
Constant for
invalidReservationUID error. |
static int |
INVALID_RESULT_TYPE
Constant for
invalidResultType error. |
static int |
INVALID_TTL
Constant for
invalidTTL error. |
| Constructor and Description |
|---|
PreRateException()
Constructs an empty exception.
|
PreRateException(int reason,
String message)
Creates a new
PreRateException with reason and message |
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
String |
getMessage()
Gets the message for this
PreRateException. |
int |
getReason()
Gets the reason of this
PreRateException. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setMessage(String message)
Sets the message for this
PreRateException. |
void |
setReason(int reason)
Sets the reason of this
PreRateException. |
String |
toString() |
getOperandReferenceaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic static final int INVALID_RESERVATION_UID
invalidReservationUID error.public static final int INVALID_TTL
invalidTTL error.public static final int INVALID_DEFAULT_RESOLUTION
invalidDefaultResolution error.public static final int INVALID_RESULT_TYPE
invalidResultType error.public PreRateException()
public PreRateException(int reason,
String message)
PreRateException with reason and messagereason - the reasonmessage - the additional messageINVALID_RESERVATION_UID,
INVALID_TTL,
INVALID_DEFAULT_RESOLUTION,
INVALID_RESULT_TYPEpublic void setReason(int reason)
PreRateException.reason - the reason of this PreRateExceptionINVALID_RESERVATION_UID,
INVALID_TTL,
INVALID_DEFAULT_RESOLUTION,
INVALID_RESULT_TYPEpublic int getReason()
PreRateException.PreRateExceptionINVALID_RESERVATION_UID,
INVALID_TTL,
INVALID_DEFAULT_RESOLUTION,
INVALID_RESULT_TYPEpublic void setMessage(String message)
PreRateException.message - the message for this PreRateExceptionpublic String getMessage()
PreRateException.getMessage in class ThrowablePreRateExceptionpublic void setAttributes(XMLAttributes atts)
XMLMarshallableatts - The XML attributes of the current elementpublic void addCharacterData(String cData)
XMLMarshallablecData - The character data to be addedpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.tagName - The name of tag for the childchild - The child to be addedpublic void marshal(XMLOutputter output)
XMLMarshallableoutput - The XML output to marshal the object into