Package org.opentrafficsim.sim0mq.swing
Class Sim0MQPublisher
- java.lang.Object
-
- org.opentrafficsim.sim0mq.swing.Sim0MQPublisher
-
public final class Sim0MQPublisher extends Object
Sim0MQPublisher - make many OTS simulation controls and observations available over Sim0MQ.Copyright (c) 2020-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Author:
- Alexander Verbraeck, Peter Knoppers
-
-
Constructor Summary
Constructors Constructor Description Sim0MQPublisher(int port)
Create a new Sim0MQPublisher that uses TCP transport.Sim0MQPublisher(int port, AbstractSimulationScript preloadedSimulation, List<SubscriptionHandler> additionalSubscriptionHandlers)
Create a new Sim0MQPublisher that uses TCP transport.Sim0MQPublisher(int port, AbstractSimulationScript preloadedSimulation, List<SubscriptionHandler> additionalSubscriptionHandlers, List<IncomingDataHandler> incomingDataHandlers)
Create a new Sim0MQPublisher that uses TCP transport.Sim0MQPublisher(org.zeromq.ZContext zContext, String controlInput, String resultOutput)
Create a new Sim0MQPublisher that is operated through //inproc sockets.
-
-
-
Constructor Detail
-
Sim0MQPublisher
public Sim0MQPublisher(org.zeromq.ZContext zContext, String controlInput, String resultOutput)
Create a new Sim0MQPublisher that is operated through //inproc sockets.- Parameters:
zContext
- ZContext; needed to create the socketscontrolInput
- String; PULL socket for control inputresultOutput
- String; PUSH socket to output results
-
Sim0MQPublisher
public Sim0MQPublisher(int port)
Create a new Sim0MQPublisher that uses TCP transport.- Parameters:
port
- int; port number to bind to
-
Sim0MQPublisher
public Sim0MQPublisher(int port, AbstractSimulationScript preloadedSimulation, List<SubscriptionHandler> additionalSubscriptionHandlers, List<IncomingDataHandler> incomingDataHandlers) throws RemoteException
Create a new Sim0MQPublisher that uses TCP transport.- Parameters:
port
- int; port number to bind topreloadedSimulation
- AbstractSimulationScript; a fully loaded (but not started) simulationadditionalSubscriptionHandlers
- List<SubscriptionHandler>; list of additional subscription handlers (may be null)incomingDataHandlers
- List<IncomfingDataHandler>; list of additional handlers for incoming data that is not handled by the standard Sim0MQPublisher (may be null)- Throws:
RemoteException
- when construction of the Publisher failed
-
Sim0MQPublisher
public Sim0MQPublisher(int port, AbstractSimulationScript preloadedSimulation, List<SubscriptionHandler> additionalSubscriptionHandlers) throws RemoteException
Create a new Sim0MQPublisher that uses TCP transport.- Parameters:
port
- int; port number to bind topreloadedSimulation
- AbstractSimulationScript; a fully loaded (but not started) simulationadditionalSubscriptionHandlers
- List<SubscriptionHandler>; list of additional subscription handlers (may be null)- Throws:
RemoteException
- when construction of the Publisher failed
-
-