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 Constructor Description AdditionalReceivingApp()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onInteractionReceived(ApplicationInteraction applicationInteraction)
This method is called when anInteraction
is received.void
onShutdown()
The operating system calls this method to notify that the application is going to be torn down.void
onStartup()
The operating system calls this method to notify that the application is started.void
onSumoTraciResponded(SumoTraciResult sumoTraciResult)
This method is called if a SUMO TrACI response is received.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
-
-
-
-
Method Detail
-
onInteractionReceived
public void onInteractionReceived(ApplicationInteraction applicationInteraction)
Description copied from interface:MosaicApplication
This method is called when anInteraction
is received.- Specified by:
onInteractionReceived
in interfaceMosaicApplication
- Parameters:
applicationInteraction
- the specific interaction.
-
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
-
processEvent
public void processEvent(Event event) throws Exception
Description copied from interface:EventProcessor
Processes the given event.- Specified by:
processEvent
in interfaceEventProcessor
- Parameters:
event
- the event to process- Throws:
Exception
-
onSumoTraciResponded
public void onSumoTraciResponded(SumoTraciResult sumoTraciResult)
Description copied from interface:MosaicApplication
This method is called if a SUMO TrACI response is received.- Specified by:
onSumoTraciResponded
in interfaceMosaicApplication
- Parameters:
sumoTraciResult
- the response container.
-
-