Package com.highdeal.bart.hci
Class SchedulingException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.highdeal.hci.OperationFailureException
com.highdeal.bart.hci.SchedulingException
- All Implemented Interfaces:
com.highdeal.hci.OperationResult,XMLMarshallable,Serializable
public class SchedulingException
extends com.highdeal.hci.OperationFailureException
Exception thrown when an error occurs during the creation of a schedulable job.
This class implements the methods for the description of a scheduling
exception.
- See Also:
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="schedulingFault">
<xs:complexType>
<xs:attribute name="reason" type="SchedulingReasonType"/>
<xs:attribute name="message" type="xs:string"/>
</xs:complexType>
</xs:element><xs:simpleType name="SchedulingReasonType">
<xs:restriction base="xs:string">
<xs:enumeration value="internalError"/>
<xs:enumeration value="tooManyJobsScheduled"/>
<xs:enumeration value="nullJob"/>
<xs:enumeration value="invalidJob"/>
<xs:enumeration value="doesNotExist"/>
<xs:enumeration value="invalidScheduling"/>
<xs:enumeration value="incompatibleChange"/>
<xs:enumeration value="cannotInitializeJob"/>
</xs:restriction>
</xs:simpleType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe job can not be initialized.static final intThe job can not be modified.static final intReserved for internal use.static final intThe job is not valid.static final intThe given scheduling is not valid.static final intThis job doesn't exist.static final intThe job is null.static final intToo many job are scheduled in the same time. -
Constructor Summary
ConstructorsConstructorDescriptionBuilds an empty SchedulingException.SchedulingException(int reason) Builds an SchedulingException.SchedulingException(int reason, String operandReference) Builds an SchedulingException. -
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_ERRORReserved for internal use.- See Also:
-
TOO_MANY_JOBS_SCHEDULED
public static final int TOO_MANY_JOBS_SCHEDULEDToo many job are scheduled in the same time.- See Also:
-
NULL_JOB
public static final int NULL_JOBThe job is null.- See Also:
-
INVALID_JOB
public static final int INVALID_JOBThe job is not valid.- See Also:
-
JOB_DOES_NOT_EXIST
public static final int JOB_DOES_NOT_EXISTThis job doesn't exist.- See Also:
-
INVALID_SCHEDULING
public static final int INVALID_SCHEDULINGThe given scheduling is not valid.- See Also:
-
INCOMPATIBLE_CHANGE
public static final int INCOMPATIBLE_CHANGEThe job can not be modified.- See Also:
-
CANNOT_INITIALIZE_JOB
public static final int CANNOT_INITIALIZE_JOBThe job can not be initialized.- See Also:
-
-
Constructor Details
-
SchedulingException
public SchedulingException()Builds an empty SchedulingException. -
SchedulingException
public SchedulingException(int reason) Builds an SchedulingException.- Parameters:
reason- The reason of the exception
-
SchedulingException
Builds an SchedulingException.- Parameters:
reason- The reason of the exceptionoperandReference- An operand reference such as faultly job ID
-
-
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
-