Class AbstractSubscriptionPublisher

    • Constructor Detail

      • AbstractSubscriptionPublisher

        public AbstractSubscriptionPublisher()
    • Method Detail

      • onAttributeValueChanged

        protected void onAttributeValueChanged​(String attributeName,
                                               Object value)
        Called by generated <Interface>AbstractProvider classes to notify all registered listeners about the attribute change.

        NOTE: Provider implementations should _not_ call this method but use attribute specific <Interface>AbstractProvider.<attribute>Changed methods.

        Parameters:
        attributeName - the attribute name as defined in the Franca model.
        value - the new value of the changed attribute.
      • fireBroadcast

        protected void fireBroadcast​(String broadcastName,
                                     List<BroadcastFilter> broadcastFilters,
                                     Object... values)
        Called by generated <Interface>AbstractProvider classes to notify all registered listeners about the fired broadcast.

        NOTE: Provider implementations should _not_ call this method but use broadcast specific <Interface>AbstractProvider.fire<Broadcast> methods.

        Parameters:
        broadcastName - the broadcast name as defined in the Franca model.
        broadcastFilters - the list of filters to apply.
        values - the broadcast arguments.
      • fireMulticast

        protected void fireMulticast​(String multicastName,
                                     String[] partitions,
                                     Object... values)
        Called by generated <Interface>AbstractProvider classes to notify all registered multicast listeners about the fired multicast.

        NOTE: Provider implementations should _not_ call this method but use multicast specific <Interface>AbstractProvider.fire<Multicast> methods.

        Parameters:
        multicastName - the multicast name as defined in the Franca model (as a non-selective broadcast).
        partitions - the partitions which will be used in transmitting the multicast
        values - the broadcast arguments.
      • registerAttributeListener

        public void registerAttributeListener​(String attributeName,
                                              AttributeListener attributeListener)
        Registers an attribute listener that gets notified in case the attribute changes. This is used for on change subscriptions.
        Specified by:
        registerAttributeListener in interface SubscriptionPublisherObservable
        Parameters:
        attributeName - the attribute name as defined in the Franca model to subscribe to.
        attributeListener - the listener to add.
      • registerBroadcastListener

        public void registerBroadcastListener​(String broadcastName,
                                              BroadcastListener broadcastListener)
        Registers a broadcast listener that gets notified in case the broadcast is fired.
        Specified by:
        registerBroadcastListener in interface SubscriptionPublisherObservable
        Parameters:
        broadcastName - the broadcast name as defined in the Franca model to subscribe to.
        broadcastListener - the listener to add.
      • addBroadcastFilter

        public void addBroadcastFilter​(BroadcastFilterImpl filter)
        Adds a broadcast filter to the provider. The filter is specific for a single broadcast as defined in the Franca model. It will be executed once for each subscribed client whenever the broadcast is fired. Clients set individual filter parameters to control filter behavior.
        Specified by:
        addBroadcastFilter in interface SubscriptionPublisher
        Parameters:
        filter - the filter to add.