Class DataPacket<T>
java.lang.Object
cz.cuni.kubinja.hospitalsystem.packet.GeneralPacket
cz.cuni.kubinja.hospitalsystem.packet.DataPacket<T>
- Type Parameters:
T- Type of the data that will be attached to the API response.
Extension of the general packet that also provides caller with the data output connected to the API request.
-
Nested Class Summary
Nested classes/interfaces inherited from class GeneralPacket
GeneralPacket.Msg -
Field Summary
FieldsFields inherited from class GeneralPacket
error, successful -
Constructor Summary
ConstructorsConstructorDescriptionDataPacket(Exception exception) Creates unsuccessful data packet.DataPacket(T data) Creates successful data packet based on provided data. -
Method Summary
Methods inherited from class GeneralPacket
resolveStatus
-
Field Details
-
data
Data wrapper inside the data packet
-
-
Constructor Details
-
DataPacket
Creates successful data packet based on provided data.- Parameters:
data- Data that will be stored in data packet (representing API data response).
-
DataPacket
Creates unsuccessful data packet.- Parameters:
exception- Exception that occurs while processing the API request.
-