Class GeneralPacket
java.lang.Object
cz.cuni.kubinja.hospitalsystem.packet.GeneralPacket
- Direct Known Subclasses:
DataPacket
Wrapper for status information transported via API between hospital system and TUI menu.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classWrapper class containing messages connected with the packets. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringError message of the exception that occurs while processing API requestfinal booleanDenotes whether the API request connected to the packet was successful -
Constructor Summary
ConstructorsConstructorDescriptionCreates general packet.GeneralPacket(Exception exception) Creates general packet. -
Method Summary
Modifier and TypeMethodDescriptionReturns information message about the successfulness of the process.
-
Field Details
-
successful
public final boolean successfulDenotes whether the API request connected to the packet was successful -
error
Error message of the exception that occurs while processing API request
-
-
Constructor Details
-
GeneralPacket
public GeneralPacket()Creates general packet.Constructor does not get any exception therefore object created via this constructor represents successful process.
-
GeneralPacket
Creates general packet.Constructs general packet that represents unsuccessful process.
- Parameters:
exception- Exception that occurs via processing the API request.
-
-
Method Details
-
resolveStatus
Returns information message about the successfulness of the process.- Returns:
- information message about the successfulness of the process.
-