|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeerbase.PeerInfo
public class PeerInfo
Maintains information related to the location of a peer node in the system, along with the peer's (unique) identifier in the peer-to- peer network.
Constructor Summary | |
---|---|
PeerInfo(int port)
Creates a PeerInfo object storing only the TCP port number. |
|
PeerInfo(java.lang.String host,
int port)
Creates and initializes a new PeerInfo object, with the peer's identifier set to "host:port". |
|
PeerInfo(java.lang.String id,
java.lang.String host,
int port)
Creates and initializes a new PeerInfo object. |
Method Summary | |
---|---|
java.lang.String |
getHost()
|
java.lang.String |
getId()
|
int |
getPort()
|
void |
setHost(java.lang.String host)
|
void |
setId(java.lang.String id)
|
void |
setPort(int port)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PeerInfo(java.lang.String id, java.lang.String host, int port)
id
- this peer's (unique) identifier in the peer-to-peer systemhost
- the IP addressport
- the TCP port numberpublic PeerInfo(java.lang.String host, int port)
host
- the IP addressport
- the TCP port numberpublic PeerInfo(int port)
Method Detail |
---|
public java.lang.String getHost()
public java.lang.String getId()
public int getPort()
public void setHost(java.lang.String host)
host
- the host to setpublic void setId(java.lang.String id)
id
- the id to setpublic void setPort(int port)
port
- the port to setpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |