Interface Peer

All Known Implementing Classes:
AppModel, AreaContainer, ArrayNodeList, Bind, BindingNode, BindItems, BooleanValue, Border, Button, Calculate, Caption, Chars, Color, Comment, CompoundAssertion, ConfigurationElement, ConfigurationKey, ConfigurationModel, ConfigurationUri, ConfigurationValue, Connect, ConnectionSetModel, Container, Content, ContentArea, DataModel, DataModel.AttributeWrapper, DataNode, DataWindow, DateTimeEdit, DateTimeValue, DateValue, DecimalValue, Delta, Dispatcher, Document, Draw, DSigData, EffectiveInputPolicy, EffectiveOutputPolicy, EffectivePolicy, Element, ElementNodeList, EventPseudoModel, EventTag, ExclGroup, ExDataValue, Field, Fill, FloatValue, FormChoiceListField, FormDataListener, FormExclGroup, FormField, FormInstanceManager, FormItemsDataListener, FormListener, FormManifest, FormModel, FormSubform, FormSubformSet, GenericNode, GenericTextContainer, HostPseudoModel, ImageValue, InstanceManager, IntegerValue, Items, Keep, LayoutNode, Linear, ListBase, LocaleSetModel, Manifest, Margin, Model, ModelPeer, Node, NodeList, Obj, Occur, Packet, PageArea, PageSet, Picture, Policy, PrimitiveAssertion, ProcessingInstruction, Proto, ProtoableNode, PseudoModel, RectangleValue, RichTextNode, Script, ScriptDispatcher, SetProperty, Subform, SubformSet, SVGNode, SVGTextData, TemplateModel, TextEdit, TextNode, TextValue, TimeValue, Traverse, UI, Value, Variables, WSDLBindingOperation, WSDLConnection, WSDLDocument, WSDLExten, WSDLMessage, WSDLNode, WSDLOperation, WSDLPart, XFAList, XMLConnection, XMLMultiSelectNode, XSDConnection

public interface Peer
  • Field Details

  • Method Details

    • addPeer

      void addPeer(Peer peerNode)
      Add a peer node to be notified of state changes.
      Parameters:
      peerNode - - The reference to the peer object to be added.
    • addPeeredNode

      void addPeeredNode(Peer peer)
    • clearPeers

      void clearPeers()
      Removes this node from all peer relationships.
    • deafen

      void deafen()
      Makes this peer deaf to any updateFromPeer calls made by notifyPeers
    • getPeer

      Peer getPeer(int nPeer)
      return the requested 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.
    • isDeaf

      boolean isDeaf()
      Checks if this peer is deaf.
      Returns:
      true if this peer does not listen to notifyPeer calls, else false.
    • isMute

      boolean isMute()
      Checks if this peer is mute.
      Returns:
      true if this peer does not notify its peers when notifyPeers is called, else false.
    • mute

      void mute()
      Makes this peer no longer notify its peers when notifyPeers is called
    • notifyPeers

      void notifyPeers(int eventType, String arg1, Object arg2)
      Sends notification to the peer nodes that this object has changed.
      Parameters:
      eventType - the event type as enumerated in this class
      arg1 - additional event information
      arg2 - additional event information
    • removePeer

      void removePeer(Peer peerNode)
      Remove a peer node from the notification list.
      Parameters:
      peerNode - the peer object to be removed
    • removePeeredNode

      void removePeeredNode(Peer peer)
    • unDeafen

      void unDeafen()
      Allows this peer to receive updateFromPeer calls
    • unMute

      void unMute()
      Allows this peer to notify its peers when notifyPeers is called.
    • updateFromPeer

      void updateFromPeer(Object peerNode, int eventType, String arg1, Object arg2)
      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
       
      Parameters:
      peerNode - the peer to this object.
      eventType - the event type as enumerated in this class
      arg1 - additional event information
      arg2 - additional event information
    • peerRemoved

      void peerRemoved(Peer peer)
      Called when this Peer is removed from peer. Derived classes can override this method to receive direct notifications when a peer is removed.
      Parameters:
      peer - the Peer from which this Peer has been removed from notification.