public class IMBObserver extends Object implements Observer
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
IMBObserver(String host,
int port,
String modelName,
int modelId,
String federation)
Construct a new connection for sending events to IMB.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
postMessage(String eventName,
int eventType,
Object[] args)
Compose a message containing the specified objects and send it to recipients.
|
String |
toString() |
public IMBObserver(String host, int port, String modelName, int modelId, String federation) throws Exception
host - String; name of the IMB hubport - int; port number of the IMB hubmodelName - String; local model namemodelId - int; model idfederation - String; federation on the IMB hubException - when a connection to the IMB hub could not be establishedpublic final boolean postMessage(String eventName, int eventType, Object[] args) throws Exception
postMessage in interface ObservereventName - String; publicationeventType - int; one of NEW, CHANGE, or DELETEargs - Object[]; the objects to sendExceptionCopyright © 2014–2016 Delft University of Technology. All rights reserved.