Package com.adobe.xfa.ut
Class PeerImpl
- java.lang.Object
-
- com.adobe.xfa.ut.PeerImpl
-
public final class PeerImpl extends java.lang.Object
This class provides an implementation of the Peer interface. Classes that implement Peer will typically hold an instance of this interface and delegate calls on the Peer interface to the instance of PeerImpl..A
Peer
can add anotherPeer
to its peer list viaaddPeer()
. AllPeers
in the peer list will be notified of peer changes whenupdateFromPeer()
is called.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPeer(Peer peerNode)
Add a peer node to be notified of state changes.void
addPeeredNode(Peer peer)
Called when a peer adds this as a peer.void
clearPeers()
clear all peer relationshipsvoid
deafen()
Peer
getPeer(int nPeer)
return the requested peerboolean
isDeaf()
boolean
isMute()
void
mute()
void
notifyPeers(int eventType, java.lang.String arg1, java.lang.Object arg2)
void
removeFromList(Peer peer, Peer[] peerList)
void
removePeer(Peer peerNode)
Remove a peer node from the notification list.void
removePeeredNode(Peer peer)
void
unDeafen()
void
unMute()
-
-
-
Constructor Detail
-
PeerImpl
public PeerImpl(Peer src)
-
-
Method Detail
-
addPeer
public 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
public void addPeeredNode(Peer peer)
Called when a peer adds this as a peer.- Parameters:
peer
- the peer adding this as a peer.
-
clearPeers
public void clearPeers()
clear all peer relationships
-
deafen
public void deafen()
-
getPeer
public 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
public boolean isDeaf()
-
isMute
public boolean isMute()
-
mute
public void mute()
-
notifyPeers
public void notifyPeers(int eventType, java.lang.String arg1, java.lang.Object arg2)
-
removePeer
public void removePeer(Peer peerNode)
Remove a peer node from the notification list.- Parameters:
peerNode
- - The reference to the peer object to be removed.
-
removePeeredNode
public void removePeeredNode(Peer peer)
-
unDeafen
public void unDeafen()
-
unMute
public void unMute()
-
-