Class StateChangeDispatcher


  • public class StateChangeDispatcher
    extends Object
    Component that holds references to listeners interested in changes to item states and dispatches notifications.
    • Constructor Detail

      • StateChangeDispatcher

        public StateChangeDispatcher()
    • Method Detail

      • addListener

        public void addListener​(ItemStateListener listener)
        Add an ItemStateListener.
        Parameters:
        listener - the new listener to be informed on modifications
      • removeListener

        public void removeListener​(ItemStateListener listener)
        Remove an ItemStateListener
        Parameters:
        listener - an existing listener
      • notifyStateCreated

        public void notifyStateCreated​(ItemState created)
        Notify listeners about changes to some state.
        Parameters:
        created - created state.
      • notifyStateModified

        public void notifyStateModified​(ItemState modified)
        Notify listeners about changes to some state.
        Parameters:
        modified - modified state.
      • notifyStateDestroyed

        public void notifyStateDestroyed​(ItemState destroyed)
        Notify listeners about changes to some state.
        Parameters:
        destroyed - destroyed state.
      • notifyStateDiscarded

        public void notifyStateDiscarded​(ItemState discarded)
        Notify listeners about changes to some state.
        Parameters:
        discarded - discarded state.
      • notifyNodeAdded

        public void notifyNodeAdded​(NodeState state,
                                    Name name,
                                    int index,
                                    NodeId id)
        Notify listeners about changes to some state.
        Parameters:
        state - node state that changed
        name - name of node that was added
        index - index of new node
        id - id of new node
      • notifyNodesReplaced

        public void notifyNodesReplaced​(NodeState state)
        Notify listeners about changes to some state.
        Parameters:
        state - node state that changed
      • notifyNodeModified

        public void notifyNodeModified​(NodeState state)
        Notify listeners about changes to some state.
        Parameters:
        state - node state that changed
      • notifyNodeRemoved

        public void notifyNodeRemoved​(NodeState state,
                                      Name name,
                                      int index,
                                      NodeId id)
        Notify listeners about changes to some state.
        Parameters:
        state - node state that changed
        name - name of node that was added
        index - index of new node
        id - id of new node