Class AbstractBinding<P extends BindingProvider>

    • Constructor Detail

      • AbstractBinding

        public AbstractBinding()
    • Method Detail

      • setEventPublisher

        public void setEventPublisher​(EventPublisher eventPublisher)
      • unsetEventPublisher

        public void unsetEventPublisher​(EventPublisher eventPublisher)
      • activate

        public void activate()
      • deactivate

        public void deactivate()
      • addBindingProvider

        public void addBindingProvider​(BindingProvider provider)
        Adds provider to the list of BindingProviders and adds this as BindingConfigChangeListener. If provider contains any binding an the refresh-Thread is stopped it will be started.
        Parameters:
        provider - the new BindingProvider to add
      • removeBindingProvider

        public void removeBindingProvider​(BindingProvider provider)
        Removes provider from the list of providers. If there is no provider left the refresh thread is getting interrupted.
        Parameters:
        provider - the BindingProvider to remove
      • bindingsExist

        protected boolean bindingsExist()
        Returns:
        true if any of the BindingProviders provides a binding
      • internalReceiveCommand

        protected void internalReceiveCommand​(String itemName,
                                              Command command)
        Is called by receiveCommand() only if one of the BindingProviders provide a binding for itemName.
        Parameters:
        itemName - the item on which command will be executed
        command - the Command to be executed on itemName
      • internalReceiveUpdate

        protected void internalReceiveUpdate​(String itemName,
                                             State newState)
        Is called by receiveUpdate() only if one of the BindingProviders provide a binding for itemName.
        Parameters:
        itemName - the item on which command will be executed
        newState - the State to be update
      • providesBindingFor

        protected boolean providesBindingFor​(String itemName)
        checks if any of the bindingProviders contains an adequate mapping
        Parameters:
        itemName - the itemName to check
        Returns:
        true if any of the bindingProviders contains an adequate mapping for itemName and false otherwise
      • bindingChanged

        public void bindingChanged​(BindingProvider provider,
                                   String itemName)
        Description copied from interface: BindingChangeListener
        Called, if a single binding has changed. The given item could have been added or removed.
        Specified by:
        bindingChanged in interface BindingChangeListener
        Parameters:
        provider - the binding provider where the binding has changed
        itemName - the item name for which the binding has changed