Interface INetworkEventBus

All Known Implementing Classes:
NetworkEventBus

public interface INetworkEventBus
An event bus for INetwork events where INetworkElement instances can listen to.
  • Method Details

    • register

      void register(IEventListenableNetworkElement<?> target, Class<? extends INetworkEvent> eventType)
      Register a network element for the given event type.
      Parameters:
      target - The element that will be called once the event bus receives the given event.
      eventType - The event type.
    • unregister

      void unregister(IEventListenableNetworkElement<?> target, Class<? extends INetworkEvent> eventType)
      Unregister a network element for the given event type.
      Parameters:
      target - The element that would be called once the event bus receives the given event.
      eventType - The event type.
    • unregister

      void unregister(IEventListenableNetworkElement<?> target)
      Unregister all events for the given network element.
      Parameters:
      target - The element that would be called once the event bus receives events.
    • post

      void post(INetworkEvent event)
      Post the given event to the events bus.
      Parameters:
      event - The event to post.
    • postCancelable

      boolean postCancelable(ICancelableNetworkEvent event)
      Post the given cancelable event to the events bus.
      Parameters:
      event - The event to post.
      Returns:
      If the event was not canceled.