Bus¶
-
public class
Bus¶ Implement an inprocess channel for passing events between different connectors. Ingoing events via the
push(Event)method are synchronously dispatched to all registeredEventHandlers, which usually should beInConnectorinstances.- Author
jwienke
Methods¶
addHandler¶
-
public void
addHandler(EventHandler handler)¶ Add a handler to receive new events.
- Parameters
handler – the handler
getTransportUri¶
-
public URI
getTransportUri()¶ Return the URI describing the transport manifested by this bus. Only valid if activated.
- Throws
IllegalStateException – instance is in wrong state to prepare the URI
- Returns
URI, not
null
push¶
removeHandler¶
-
public void
removeHandler(EventHandler handler)¶ Removes a handler from the event receiving. Once removed, no new events will be received.
- Parameters
handler – the handler