Class PersonGetTaxiReservations
java.lang.Object
org.eclipse.mosaic.fed.sumo.bridge.traci.AbstractTraciCommand<List<RideReservation>>
org.eclipse.mosaic.fed.sumo.bridge.traci.PersonGetTaxiReservations
- All Implemented Interfaces:
PersonGetTaxiReservations
public class PersonGetTaxiReservations
extends AbstractTraciCommand<List<RideReservation>>
implements PersonGetTaxiReservations
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.mosaic.fed.sumo.bridge.traci.AbstractTraciCommand
AbstractTraciCommand.TraciCommandResultReaderBuilder, AbstractTraciCommand.TraciCommandWriterBuilder -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newPersonGetTaxiReservationstraci command, which will return all taxi reservations for the requested state. -
Method Summary
Modifier and TypeMethodDescriptionprotected List<RideReservation>constructResult(Status status, Object... objects) This method is called during reading the command response when all readers have been executed.This method gets the available taxi reservations.Methods inherited from class org.eclipse.mosaic.fed.sumo.bridge.traci.AbstractTraciCommand
execute, executeAndReturn, executeAndReturnList, read, write
-
Constructor Details
-
PersonGetTaxiReservations
public PersonGetTaxiReservations()Creates a newPersonGetTaxiReservationstraci command, which will return all taxi reservations for the requested state. Access needs to be public, because command is called using Reflection.- See Also:
-
-
Method Details
-
execute
public List<RideReservation> execute(Bridge bridge) throws CommandException, InternalFederateException Description copied from interface:PersonGetTaxiReservationsThis method gets the available taxi reservations.- Specified by:
executein interfacePersonGetTaxiReservations- Parameters:
bridge- Connection to SUMO.- Returns:
- list of the taxi reservations
- Throws:
CommandException- if the status code of the response is ERROR. The connection to SUMO is still available.InternalFederateException- if some serious error occurs during writing or reading. The connection to SUMO is shut down.
-
constructResult
Description copied from class:AbstractTraciCommandThis method is called during reading the command response when all readers have been executed. The results of the readers are passed to this method.- Specified by:
constructResultin classAbstractTraciCommand<List<RideReservation>>- Parameters:
status- the status of the responseobjects- the objects created by the configured readers- Returns:
- the final result constructed from the passed objects
-