private void sendMessage(final VolatileModelElement model) throws IOException {
Runnable worker = new Runnable() {
@Override
public synchronized void run() {
if (model instanceof Vehicle) {
Vehicle sendingVehicle = (Vehicle) model;
modelController.sendNetworkMessage(sendingVehicle.getID(), sendingVehicle.getSentMessageID(),
sendingVehicle.getIPSegments(), sendingVehicle.getDestinationLatitude(),
sendingVehicle.getDestinationLongitude(), sendingVehicle.getDestinationRadius());
}
else if (model instanceof RoadsideUnit) {
RoadsideUnit sendingRoadsideUnit = (RoadsideUnit) model;
modelController.sendNetworkMessage(sendingRoadsideUnit.getID(),
sendingRoadsideUnit.getSentMessageID(), sendingRoadsideUnit.getIPSegments(),