Package it.polito.appeal.traci.protocol
Class ResponseContainer
java.lang.Object
it.polito.appeal.traci.protocol.ResponseContainer
Represents all the information related to a given request. It contains a
mandatory status response, an optional response command and an optional list
of sub-responses.
- Author:
- Enrico Gueli <enrico.gueli@polito.it>
-
Constructor Summary
ConstructorDescriptionResponseContainer
(StatusResponse status, Command response) Constructor for a response container with status response and a response command.ResponseContainer
(StatusResponse status, Command response, List<Command> subResponses) Constructor for a response container with status response, response command and zero or more sub-responses. -
Method Summary
Modifier and TypeMethodDescriptionReturns the status response
-
Constructor Details
-
ResponseContainer
Constructor for a response container with status response, response command and zero or more sub-responses.- Parameters:
status
- statusresponse
- responsesubResponses
- sub response
-
ResponseContainer
Constructor for a response container with status response and a response command.- Parameters:
status
- statusresponse
- response
-
-
Method Details
-
getStatus
Returns the status response- Returns:
- the status
-
getResponse
- Returns:
- the response command. It may return
null
if there is no response to such command (i.e. a command that changes something in the simulation state or the close command)
-
getSubResponses
- Returns:
- the sub-responses of this response container. It may return
null
if there are no sub-responses to such command (i.e. commands different than CMD_SIMSTEP2)
-