Class EventRegistry

    • Constructor Detail

      • EventRegistry

        public EventRegistry​(org.osgi.framework.BundleContext bundleContext)
    • Method Detail

      • addPossibleEventConsumer

        public void addPossibleEventConsumer​(Object possibleEventConsumer,
                                             VaadinApplicationContext applicationContext)
        Adds the possibleEventConsumer as an EventListener/EventConsumer to the OSGi registry.

        The event consumer is registered when:
        • The object has at least one method annotated with @EventConsumer
        • The annotated method has only one parameter.

        Attention: If the possibleEventConsumer has no Annotation @EventConsumer or has multiple method parameters the object is not registered as a listener!
        The VaadinApplicationContext parameter is used to bind the event consumer to the user session (otherwise all users would be informed when one user provokes an event notification).
        Parameters:
        possibleEventConsumer - An object with or without an annotation @EventConsumer.
        applicationContext - must not be null. is used to bind the event consumer to the user session (otherwise all users would be informed when one user provokes an event notification).