Package com.highdeal.bart.hci
Class InvalidAcquisitionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.highdeal.hci.OperationFailureException
com.highdeal.bart.hci.InvalidAcquisitionException
- All Implemented Interfaces:
com.highdeal.hci.OperationResult,XMLMarshallable,Serializable
public class InvalidAcquisitionException
extends com.highdeal.hci.OperationFailureException
This class implements the methods for the description of an invalid acquisition exception.
- See Also:
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="invalidAcquisitionFault">
<xs:complexType>
<xs:attribute name="reason" type="InvalidAcquisitionReasonType"/>
<xs:attribute name="message" type="xs:string"/>
</xs:complexType>
</xs:element><xs:simpleType name="InvalidAcquisitionReasonType">
<xs:restriction base="xs:string">
<xs:enumeration value="internalError"/>
<xs:enumeration value="sessionDoesNotExist"/>
<xs:enumeration value="sessionIsNull"/>
<xs:enumeration value="sessionIsAlreadyEnded"/>
<xs:enumeration value="invalidAcquisitionMode"/>
<xs:enumeration value="tooManyRunningSessions"/>
</xs:restriction>
</xs:simpleType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int2: The acquisition is already ended.static final int0: This error occurs when the acquisition session does not exist.static final int-1: Reserved for internal use.static final int3: The specified acquisition mode is invalid.static final Stringstatic final int1: The acquisition session in parameter is null.static final int4: There are too many running acquisition sessions to open a new one. -
Constructor Summary
ConstructorsConstructorDescriptionBuilds an empty InvalidAcquisitionException.InvalidAcquisitionException(int reason) Builds an InvalidAcquisitionException.InvalidAcquisitionException(int reason, String operandReference) Builds an InvalidAcquisitionException. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.Gets the message.intReturns the reason of the exception.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.toString()Returns the reason of the exception in readable format.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
INTERNAL_ERROR
public static final int INTERNAL_ERROR-1: Reserved for internal use.- See Also:
-
ACQUISITION_SESSION_DOES_NOT_EXIST
public static final int ACQUISITION_SESSION_DOES_NOT_EXIST0: This error occurs when the acquisition session does not exist.- See Also:
-
NULL_ACQUISITION_SESSION
public static final int NULL_ACQUISITION_SESSION1: The acquisition session in parameter is null.- See Also:
-
ACQUISITION_SESSION_ALREADY_ENDED
public static final int ACQUISITION_SESSION_ALREADY_ENDED2: The acquisition is already ended.- See Also:
-
INVALID_ACQUISITION_MODE
public static final int INVALID_ACQUISITION_MODE3: The specified acquisition mode is invalid.- See Also:
-
TOO_MANY_RUNNING_SESSIONS
public static final int TOO_MANY_RUNNING_SESSIONS4: There are too many running acquisition sessions to open a new one.- See Also:
-
NAME
- See Also:
-
-
Constructor Details
-
InvalidAcquisitionException
public InvalidAcquisitionException()Builds an empty InvalidAcquisitionException. -
InvalidAcquisitionException
public InvalidAcquisitionException(int reason) Builds an InvalidAcquisitionException.- Parameters:
reason- The reason of the exception
-
InvalidAcquisitionException
Builds an InvalidAcquisitionException.- Parameters:
reason- The reason of the exceptionoperandReference- An operand reference such as faultly session ID or description message
-
-
Method Details
-
getReason
public int getReason()Returns the reason of the exception.- Returns:
- The reason of the exception
-
getOperandReference
- Specified by:
getOperandReferencein interfacecom.highdeal.hci.OperationResult- Overrides:
getOperandReferencein classcom.highdeal.hci.OperationFailureException
-
toString
Returns the reason of the exception in readable format. -
getMessage
Gets the message.- Overrides:
getMessagein classThrowable- Returns:
- The message
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Parameters:
atts- TheXML attributesof the current element
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Parameters:
cData- The character data to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Parameters:
output- TheXML outputto marshal the object into
-