org.resilientedge.jockey.peer
Class PeerToken
java.lang.Object
|
+--org.resilientedge.jockey.peer.PeerToken
- All Implemented Interfaces:
- java.lang.Comparable, java.io.Serializable
- public class PeerToken
- extends java.lang.Object
- implements java.lang.Comparable, java.io.Serializable
Represents a peer, either a local session or remote device.
- Version:
- $Revision: 1.1.1.1 $
- Author:
- John Gardner
- See Also:
- Serialized Form
Method Summary |
int |
compareTo(java.lang.Object other)
Returns zero if the other peer token is the same as this token. |
boolean |
equals(java.lang.Object other)
Indicates whether some other object is "equal to" this peer. |
java.lang.String |
getPeerId()
Gets the unique peer id |
boolean |
isDirectoryPeer()
Gets the directory peer flag, indicating this peer is a directory |
void |
setDirectoryPeer(boolean newValue)
Sets the directory peer flag, indicating this peer is a directory |
void |
setPeerId(java.lang.String newValue)
Sets the unique peer id |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PeerToken
public PeerToken()
getPeerId
public java.lang.String getPeerId()
- Gets the unique peer id
- Returns:
- The PeerId value
setPeerId
public void setPeerId(java.lang.String newValue)
- Sets the unique peer id
- Parameters:
newValue
- The new PeerId value
setDirectoryPeer
public void setDirectoryPeer(boolean newValue)
- Sets the directory peer flag, indicating this peer is a directory
- Parameters:
newValue
- The new DirectoryPeer value
isDirectoryPeer
public boolean isDirectoryPeer()
- Gets the directory peer flag, indicating this peer is a directory
- Returns:
- The DirectoryPeer value
compareTo
public int compareTo(java.lang.Object other)
- Returns zero if the other peer token is the same as this token.
- Specified by:
compareTo
in interface java.lang.Comparable
- Parameters:
other
- token to compare- Returns:
- a positive or negative integer, or zero
equals
public boolean equals(java.lang.Object other)
- Indicates whether some other object is "equal to" this peer.
- Overrides:
equals
in class java.lang.Object
- Parameters:
other
- object to compare- Returns:
- true if equal
Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.