Class AdditionalReceivingApp
java.lang.Object
org.eclipse.mosaic.fed.application.app.AbstractApplication<VehicleOperatingSystem>
org.eclipse.mosaic.app.tutorial.interunitcommunication.AdditionalReceivingApp
- All Implemented Interfaces:
Application,MosaicApplication,OperatingSystemAccess<VehicleOperatingSystem>,EventProcessor
public class AdditionalReceivingApp
extends AbstractApplication<VehicleOperatingSystem>
implements MosaicApplication
This application is used only as an additional demonstration of MosaicInteractionHandlingApp's work.
It receives MyInteraction (inherits from ApplicationInteraction) sent by MosaicInteractionHandlingApp and logs its content.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonInteractionReceived(ApplicationInteraction applicationInteraction) This method is called when anInteractionis received.voidThe operating system calls this method to notify that the application is going to be torn down.voidThe operating system calls this method to notify that the application is started.voidonSumoTraciResponded(SumoTraciResult sumoTraciResult) This method is called if a SUMO TrACI response is received.voidprocessEvent(Event event) Processes the given event.Methods inherited from class org.eclipse.mosaic.fed.application.app.AbstractApplication
canProcessEvent, getLog, getOperatingSystem, getRandom, isTornDown, isValidStateAndLog, setUp, tearDownMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.mosaic.lib.util.scheduling.EventProcessor
canProcessEventMethods inherited from interface org.eclipse.mosaic.fed.application.app.api.OperatingSystemAccess
getOs
-
Constructor Details
-
AdditionalReceivingApp
public AdditionalReceivingApp()
-
-
Method Details
-
onInteractionReceived
Description copied from interface:MosaicApplicationThis method is called when anInteractionis received.- Specified by:
onInteractionReceivedin interfaceMosaicApplication- Parameters:
applicationInteraction- the specific interaction.
-
onStartup
public void onStartup()Description copied from interface:ApplicationThe operating system calls this method to notify that the application is started.- Specified by:
onStartupin interfaceApplication
-
onShutdown
public void onShutdown()Description copied from interface:ApplicationThe operating system calls this method to notify that the application is going to be torn down.- Specified by:
onShutdownin interfaceApplication
-
processEvent
Description copied from interface:EventProcessorProcesses the given event.- Specified by:
processEventin interfaceEventProcessor- Parameters:
event- the event to process- Throws:
Exception
-
onSumoTraciResponded
Description copied from interface:MosaicApplicationThis method is called if a SUMO TrACI response is received.- Specified by:
onSumoTraciRespondedin interfaceMosaicApplication- Parameters:
sumoTraciResult- the response container.
-