public interface Connector
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.
Modifier and Type | Interface and Description |
---|---|
static class |
Connector.IMBEventType
Enum for IMB event types.
|
Modifier and Type | Method and Description |
---|---|
String |
getFederation()
Return the federation name of the connection, e.g.
|
String |
getHost()
Return the host of the connection, e.g.
|
int |
getModelId()
Return the model id (owner id) of the connection, e.g.
|
String |
getModelName()
Return the model name (owner name) of the connection, e.g.
|
int |
getPort()
Return the port of the connection, e.g.
|
boolean |
postIMBMessage(String IMBEventName,
Connector.IMBEventType imbEventType,
Object[] args)
Compose a message containing the specified objects and send it to recipients.
|
void |
register(String fullIMBEventName,
Transceiver transceiver)
Register the transceiver as the interested party when an IMB message identified by the imbEventName is received.
|
boolean postIMBMessage(String IMBEventName, Connector.IMBEventType imbEventType, Object[] args) throws IMBException
IMBEventName
- String; publicationimbEventType
- IMBEventType; one of NEW, CHANGE, or DELETEargs
- Object[]; the objects to sendIMBException
- when the event name is not a registered publicationvoid register(String fullIMBEventName, Transceiver transceiver) throws IMBException
fullIMBEventName
- the IMB Event name including the federation prefix, e.g. OTS_RT.SIM_Starttransceiver
- the transceiver to handle the incoming eventIMBException
- in case the transceiver is switched to a new one for an eventString getHost()
int getPort()
String getModelName()
int getModelId()
String getFederation()
Copyright © 2014–2016 Delft University of Technology. All rights reserved.