Interface IEventManager

  • All Known Implementing Classes:
    EventManager

    public interface IEventManager
    Author:
    hengsin
    • Method Detail

      • postEvent

        boolean postEvent​(org.osgi.service.event.Event event)
        Initiate asynchronous delivery of an event. This method returns to the caller before delivery of the event is completed.
        Parameters:
        event - The event to send to all listeners which subscribe to the topic of the event.
        Throws:
        SecurityException - If the caller does not have TopicPermission[topic,PUBLISH] for the topic specified in the event.
      • sendEvent

        boolean sendEvent​(org.osgi.service.event.Event event)
        Initiate synchronous delivery of an event. This method does not return to the caller until delivery of the event is completed.
        Parameters:
        event - The event to send to all listeners which subscribe to the topic of the event.
        Throws:
        SecurityException - If the caller does not have TopicPermission[topic,PUBLISH] for the topic specified in the event.
      • register

        boolean register​(String topic,
                         org.osgi.service.event.EventHandler eventHandler)
        register a new event handler
        Parameters:
        topic -
        eventHandler -
        Returns:
        true if registration is successful, false otherwise
      • register

        boolean register​(String[] topics,
                         org.osgi.service.event.EventHandler eventHandler)
        register a new event handler
        Parameters:
        topics -
        eventHandler -
        Returns:
        true if registration is successful, false otherwise
      • register

        boolean register​(String topic,
                         String filter,
                         org.osgi.service.event.EventHandler eventHandler)
        register a new event handler
        Parameters:
        topic -
        filter -
        eventHandler -
        Returns:
        true if registration is successful, false otherwise
      • register

        boolean register​(String[] topics,
                         String filter,
                         org.osgi.service.event.EventHandler eventHandler)
        register a new event handler
        Parameters:
        topics -
        filter -
        eventHandler -
        Returns:
        true if registration is successful, false otherwise
      • unregister

        boolean unregister​(org.osgi.service.event.EventHandler eventHandler)
        un-register an event handler
        Parameters:
        eventHandler -
        Returns:
        true if unregistration is done, false otherwise
      • register

        default boolean register​(BaseEventHandler eventHandler)
        Parameters:
        eventHandler -
        Returns: