Class NotProcessingApp
java.lang.Object
org.eclipse.mosaic.fed.application.app.AbstractApplication<VehicleOperatingSystem>
org.eclipse.mosaic.app.tutorial.interappcommunication.NotProcessingApp
- All Implemented Interfaces:
Application
,OperatingSystemAccess<VehicleOperatingSystem>
,VehicleApplication
,EventProcessor
public class NotProcessingApp
extends AbstractApplication<VehicleOperatingSystem>
implements VehicleApplication
This application is used only as an addition to the InterconnectApp.
It doesn't implement processEvent method,
thus not being able to receive the message that is sent from InterconnectApp.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
The operating system calls this method to notify that the application is going to be torn down.void
The operating system calls this method to notify that the application is started.void
onVehicleUpdated
(VehicleData previousVehicleData, VehicleData updatedVehicleData) Is called when ever the vehicle has moved.void
processEvent
(Event event) Processes the given event.Methods inherited from class org.eclipse.mosaic.fed.application.app.AbstractApplication
canProcessEvent, getLog, getOperatingSystem, getRandom, isTornDown, isValidStateAndLog, setUp, tearDown
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.mosaic.lib.util.scheduling.EventProcessor
canProcessEvent
Methods inherited from interface org.eclipse.mosaic.fed.application.app.api.OperatingSystemAccess
getOs
-
Constructor Details
-
NotProcessingApp
public NotProcessingApp()
-
-
Method Details
-
processEvent
Description copied from interface:EventProcessor
Processes the given event.- Specified by:
processEvent
in interfaceEventProcessor
- Parameters:
event
- the event to process
-
onStartup
public void onStartup()Description copied from interface:Application
The operating system calls this method to notify that the application is started.- Specified by:
onStartup
in interfaceApplication
-
onShutdown
public void onShutdown()Description copied from interface:Application
The operating system calls this method to notify that the application is going to be torn down.- Specified by:
onShutdown
in interfaceApplication
-
onVehicleUpdated
public void onVehicleUpdated(@Nullable VehicleData previousVehicleData, @Nonnull VehicleData updatedVehicleData) Description copied from interface:VehicleApplication
Is called when ever the vehicle has moved. That is, if theVehicleData
of the unit has been updated.- Specified by:
onVehicleUpdated
in interfaceVehicleApplication
- Parameters:
previousVehicleData
- the previous state of the vehicleupdatedVehicleData
- the updated state of the vehicle
-