Package org.sim0mq.demo.mm1
Class MM1Queue41Application
java.lang.Object
org.sim0mq.demo.mm1.MM1Queue41Application
public class MM1Queue41Application extends Object
Copyright (c) 2015-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved.
See for project information www.simulation.tudelft.nl.
The DSOL project is distributed under a BSD-style license.
- Version:
- Aug 15, 2014
- Author:
- Alexander Verbraeck
-
Constructor Summary
Constructors Modifier Constructor Description protectedMM1Queue41Application(String modelId, int port)Construct a console application. -
Method Summary
Modifier and Type Method Description static voidmain(String[] args)protected voidstartListener(int port)Start listening on a port.protected voidterminate()stop the simulation.
-
Constructor Details
-
MM1Queue41Application
protected MM1Queue41Application(String modelId, int port) throws SimRuntimeException, RemoteException, NamingException, Sim0MQException, SerializationExceptionConstruct a console application.- Parameters:
modelId- unique Id of the model that is used as the sender/receiver when communicatingport- the sim0mq port number on which the model listens- Throws:
SimRuntimeException- on errorRemoteException- on errorNamingException- on errorSim0MQException- on errorSerializationException- on serialization problem
-
-
Method Details
-
startListener
Start listening on a port.- Parameters:
port- the sim0mq port number on which the model listens- Throws:
Sim0MQException- on errorSerializationException- on serialization problem
-
terminate
protected final void terminate()stop the simulation. -
main
public static void main(String[] args) throws SimRuntimeException, RemoteException, NamingException, Sim0MQException, SerializationException- Parameters:
args- can be left empty- Throws:
SimRuntimeException- on errorRemoteException- on errorNamingException- on errorSim0MQException- on errorSerializationException- on serialization problem
-