Package org.sim0mq.federatestarter
Class FederateStarter
- java.lang.Object
-
- org.sim0mq.federatestarter.FederateStarter
-
public class FederateStarter extends Object
The FederateStarter start listening on the given port for messages to start components. Report back via the call-back port on the status of the started components. If necessary, the FederateStarter can also forcefully stop a started (sub)process.Copyright (c) 2016-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Mar 1, 2017
BSD-style license. See Sim0MQ License.- Author:
- Alexander Verbraeck
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Object,Process>
runningProcessMap
the running programs this FederateStarter started.(package private) Properties
softwareProperties
the software properties.
-
Constructor Summary
Constructors Constructor Description FederateStarter(int fsPort, Properties softwareProperties, int startPort, int endPort, boolean modelController)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isModelController()
static void
main(String[] args)
Start listening on the given port for messages to start components.
-
-
-
Field Detail
-
runningProcessMap
protected Map<Object,Process> runningProcessMap
the running programs this FederateStarter started. The String identifies the process (e.g., a UUID or a model id).
-
softwareProperties
final Properties softwareProperties
the software properties.
-
-
Constructor Detail
-
FederateStarter
public FederateStarter(int fsPort, Properties softwareProperties, int startPort, int endPort, boolean modelController) throws Sim0MQException, SerializationException
- Parameters:
fsPort
- the port number to listen onsoftwareProperties
- the software properties to usestartPort
- first port to be used for the models, inclusiveendPort
- last port to be used for the models, inclusivemodelController
- does the Federate Starter concern models with an MC or just processes?- Throws:
Sim0MQException
- on errorSerializationException
- on error
-
-
Method Detail
-
isModelController
public boolean isModelController()
- Returns:
- modelController
-
main
public static void main(String[] args) throws Sim0MQException, SerializationException
Start listening on the given port for messages to start components. Report back via the call-back port on the status of the started components. If necessary, the FederateStarter can also forcefully stop a started (sub)process.- Parameters:
args
- the federation name and port on which the FederateStarter is listening- Throws:
Sim0MQException
- on errorSerializationException
- on error
-
-