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-2024 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 Details

    • 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 Details

    • 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 Details

    • 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