public class ResponseMessage
extends Object
Modifier and Type | Field and Description |
---|---|
static int[] |
STATUS_ONLY_RESPONSES
The list of IDs of responses that have no response commands.
|
Constructor and Description |
---|
ResponseMessage(java.io.DataInputStream dis)
Constructor that unpacks all the data from a
DataInputStream ,
populating the list of ResponseContainer s. |
Modifier and Type | Method and Description |
---|---|
java.util.List<ResponseContainer> |
responses() |
public static final int[] STATUS_ONLY_RESPONSES
public ResponseMessage(java.io.DataInputStream dis) throws java.io.IOException
DataInputStream
,
populating the list of ResponseContainer
s.
A response message is made of individual packets. It is assumed that the first packet is always a status response. According to the status response, different data are expected next:
Constants.RTYPE_OK
, another
status response or the end of the stream are expected.Constants.CMD_SIMSTEP
, it is
expected an integer representing N and N following sub-responses;STATUS_ONLY_RESPONSES
, it is expected another status response;
ResponseMessage
, collecting all the data that belong to the
same request, is built and appended to an internal list.dis
- disjava.io.IOException
- Exceptionpublic java.util.List<ResponseContainer> responses()