Package com.adobe.xfa

Class Dispatcher

  • All Implemented Interfaces:
    Peer
    Direct Known Subclasses:
    ScriptDispatcher

    public abstract class Dispatcher
    extends java.lang.Object
    implements Peer
    • Constructor Detail

      • Dispatcher

        public Dispatcher​(Element poActionContextNode,
                          java.lang.String sEventContext,
                          int nEventID,
                          EventManager poEventManager)
    • Method Detail

      • addPeer

        public void addPeer​(Peer peerNode)
        Description copied from interface: Peer
        Add a peer node to be notified of state changes.
        Specified by:
        addPeer in interface Peer
        Parameters:
        peerNode - - The reference to the peer object to be added.
      • addPeeredNode

        public void addPeeredNode​(Peer peer)
        Specified by:
        addPeeredNode in interface Peer
      • clearPeers

        public void clearPeers()
        Description copied from interface: Peer
        Removes this node from all peer relationships.
        Specified by:
        clearPeers in interface Peer
      • deafen

        public void deafen()
        Description copied from interface: Peer
        Makes this peer deaf to any updateFromPeer calls made by notifyPeers
        Specified by:
        deafen in interface Peer
      • getActionContextNode

        public Element getActionContextNode()
      • getDispatcherType

        public abstract java.lang.String getDispatcherType()
      • getEventContext

        public java.lang.String getEventContext()
      • getEventContextObj

        public Obj getEventContextObj()
      • getEventID

        public int getEventID()
      • getListenToDescendents

        public boolean getListenToDescendents()
      • getOccurring

        public boolean getOccurring()
      • getParameter

        public java.lang.String getParameter​(int nParam)
      • getPeer

        public Peer getPeer​(int nPeer)
        return the requested peer
        Specified by:
        getPeer in interface Peer
        Parameters:
        nPeer - - the 0-based position of the peer to retrieve.
        Returns:
        the peer at the requested position. When there are not more peers to return, this will return a null object.
      • getRecurring

        public boolean getRecurring()
      • isDeaf

        public boolean isDeaf()
        Description copied from interface: Peer
        Checks if this peer is deaf.
        Specified by:
        isDeaf in interface Peer
        Returns:
        true if this peer does not listen to notifyPeer calls, else false.
      • isMute

        public boolean isMute()
        Description copied from interface: Peer
        Checks if this peer is mute.
        Specified by:
        isMute in interface Peer
        Returns:
        true if this peer does not notify its peers when notifyPeers is called, else false.
      • mute

        public void mute()
        Description copied from interface: Peer
        Makes this peer no longer notify its peers when notifyPeers is called
        Specified by:
        mute in interface Peer
      • notifyPeers

        public void notifyPeers​(int eventType,
                                java.lang.String arg1,
                                java.lang.Object arg2)
        Description copied from interface: Peer
        Sends notification to the peer nodes that this object has changed.
        Specified by:
        notifyPeers in interface Peer
        Parameters:
        eventType - the event type as enumerated in this class
        arg1 - additional event information
        arg2 - additional event information
      • peerRemoved

        public void peerRemoved​(Peer peer)
        Description copied from interface: Peer
        Called when this Peer is removed from peer. Derived classes can override this method to receive direct notifications when a peer is removed.
        Specified by:
        peerRemoved in interface Peer
        Parameters:
        peer - the Peer from which this Peer has been removed from notification.
      • removePeer

        public void removePeer​(Peer oPeerNode)
        Remove a peer node from the notification list.
        Specified by:
        removePeer in interface Peer
        Parameters:
        oPeerNode - - The reference to the peer object to be removed.
      • setEventContextObj

        public void setEventContextObj​(Obj poObject)
      • setEventManager

        public void setEventManager​(EventManager poEventManager)
      • setListenToDescendents

        public void setListenToDescendents​(boolean bListenToDescendents)
      • setOccurring

        public void setOccurring​(boolean bOccurring)
      • setRecurring

        public void setRecurring​(boolean bRecurring)
      • unDeafen

        public void unDeafen()
        Description copied from interface: Peer
        Allows this peer to receive updateFromPeer calls
        Specified by:
        unDeafen in interface Peer
      • unMute

        public void unMute()
        Description copied from interface: Peer
        Allows this peer to notify its peers when notifyPeers is called.
        Specified by:
        unMute in interface Peer
      • updateFromPeer

        public void updateFromPeer​(java.lang.Object oPeerNode,
                                   int eventType,
                                   java.lang.String arg1,
                                   java.lang.Object arg2)
        Description copied from interface: Peer
        This method will be called by the peer whenever its state changes.
         eventType                        (String)arg1  (Object)arg2
         
         UPDATED                          update type   (optional)
         ATTR_CHANGED                     attr name     (optional)
         CHILD_ADDED                      (optional)    added node
         CHILD_REMOVED                    (optional)    removed node
         VALUE_CHANGED                    new data      (optional)
         PARENT_CHANGED                   (optional)    new parent
         DESCENDENT_ATTR_CHANGED          attr name     changed node
         DESCENDENT_VALUE_CHANGED         (optional)    changed node
         DESCENDENT_ADDED                 (optional)    added node
         DESCENDENT_REMOVED               (optional)    removed node
         PERMS_LOCK_SET                   (optional)    (optional)
         PERMS_LOCK_CLEARED               (optional)    (optional)
         PROTO_ATTR_CHANGED               attr name     changed node
         PROTO_CHILD_ADDED                (optional)    added node of the protoype
         PROTO_CHILD_REMOVED              (optional)    removed node from the prototype
         PROTO_VALUE_CHANGED              new data      prototype node
         PROTO_DESCENDENT_ATTR_CHANGED    attr name     changed prototype node
         PROTO_DESCENDENT_VALUE_CHANGED   (optional)    changed prototype node
         PROTO_DESCENDENT_ADDED           (optional)    added node to the prototype
         PROTO_DESCENDENT_REMOVED         (optional)    removed node from the prototype
         
        Specified by:
        updateFromPeer in interface Peer
        Parameters:
        oPeerNode - the peer to this object.
        eventType - the event type as enumerated in this class
        arg1 - additional event information
        arg2 - additional event information