public abstract class Dispatcher extends Object implements Peer
ATTR_CHANGED, CHILD_ADDED, CHILD_REMOVED, DESCENDENT_ADDED, DESCENDENT_ATTR_CHANGED, DESCENDENT_REMOVED, DESCENDENT_VALUE_CHANGED, PARENT_CHANGED, PERMS_LOCK_CLEARED, PERMS_LOCK_SET, PROTO_ATTR_CHANGED, PROTO_CHILD_ADDED, PROTO_CHILD_REMOVED, PROTO_DESCENDENT_ADDED, PROTO_DESCENDENT_ATTR_CHANGED, PROTO_DESCENDENT_REMOVED, PROTO_DESCENDENT_VALUE_CHANGED, PROTO_VALUE_CHANGED, UPDATED, VALUE_CHANGED| Constructor and Description |
|---|
Dispatcher(Element poActionContextNode,
String sEventContext,
int nEventID,
EventManager poEventManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPeer(Peer peerNode)
Add a peer node to be notified of state changes.
|
void |
addPeeredNode(Peer peer) |
void |
clearPeers()
Removes this node from all peer relationships.
|
void |
deafen()
Makes this peer deaf to any updateFromPeer calls made by notifyPeers
|
Element |
getActionContextNode() |
abstract String |
getDispatcherType() |
String |
getEventContext() |
Obj |
getEventContextObj() |
int |
getEventID() |
EventManager |
getEventManager() |
boolean |
getListenToDescendents() |
boolean |
getOccurring() |
String |
getParameter(int nParam) |
Peer |
getPeer(int nPeer)
return the requested peer
|
boolean |
getRecurring() |
boolean |
isDeaf()
Checks if this peer is deaf.
|
boolean |
isMute()
Checks if this peer is mute.
|
void |
mute()
Makes this peer no longer notify its peers when notifyPeers is called
|
void |
notifyPeers(int eventType,
String arg1,
Object arg2)
Sends notification to the peer nodes that this object has changed.
|
void |
peerRemoved(Peer peer)
Called when this Peer is removed from
peer. |
void |
removePeer(Peer oPeerNode)
Remove a peer node from the notification list.
|
void |
removePeeredNode(Peer poPeer) |
void |
setEventContextObj(Obj poObject) |
void |
setEventManager(EventManager poEventManager) |
void |
setListenToDescendents(boolean bListenToDescendents) |
void |
setOccurring(boolean bOccurring) |
void |
setRecurring(boolean bRecurring) |
void |
unDeafen()
Allows this peer to receive updateFromPeer calls
|
void |
unMute()
Allows this peer to notify its peers when notifyPeers is called.
|
void |
updateFromPeer(Object oPeerNode,
int eventType,
String arg1,
Object arg2)
This method will be called by the peer whenever its
state changes.
|
public Dispatcher(Element poActionContextNode, String sEventContext, int nEventID, EventManager poEventManager)
public void addPeer(Peer peerNode)
Peerpublic void addPeeredNode(Peer peer)
addPeeredNode in interface Peerpublic void clearPeers()
PeerclearPeers in interface Peerpublic void deafen()
Peerpublic Element getActionContextNode()
public abstract String getDispatcherType()
public String getEventContext()
public Obj getEventContextObj()
public int getEventID()
public EventManager getEventManager()
public boolean getListenToDescendents()
public boolean getOccurring()
public String getParameter(int nParam)
public Peer getPeer(int nPeer)
public boolean getRecurring()
public boolean isDeaf()
Peerpublic boolean isMute()
Peerpublic void mute()
Peerpublic void notifyPeers(int eventType,
String arg1,
Object arg2)
PeernotifyPeers in interface PeereventType - the event type as enumerated in this classarg1 - additional event informationarg2 - additional event informationpublic void peerRemoved(Peer peer)
Peerpeer.
Derived classes can override this method to receive direct notifications
when a peer is removed.peerRemoved in interface Peerpeer - the Peer from which this Peer has been removed from notification.public void removePeer(Peer oPeerNode)
removePeer in interface PeeroPeerNode - -
The reference to the peer object to be removed.public void removePeeredNode(Peer poPeer)
removePeeredNode in interface Peerpublic void setEventContextObj(Obj poObject)
public void setEventManager(EventManager poEventManager)
public void setListenToDescendents(boolean bListenToDescendents)
public void setOccurring(boolean bOccurring)
public void setRecurring(boolean bRecurring)
public void unDeafen()
Peerpublic void unMute()
Peerpublic void updateFromPeer(Object oPeerNode, int eventType, String arg1, Object arg2)
PeereventType (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
updateFromPeer in interface PeeroPeerNode - the peer to this object.eventType - the event type as enumerated in this classarg1 - additional event informationarg2 - additional event informationCopyright © 2010 - 2020 Adobe. All Rights Reserved