Class 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.
    BSD-style license. See Sim0MQ License.

    $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Mar 1, 2017
    Author:
    Alexander Verbraeck
    • 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 on
        softwareProperties - the software properties to use
        startPort - first port to be used for the models, inclusive
        endPort - last port to be used for the models, inclusive
        modelController - does the Federate Starter concern models with an MC or just processes?
        Throws:
        Sim0MQException - on error
        SerializationException - 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 error
        SerializationException - on error