|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object CTL.Types.PeerID
public class PeerID
ID of a remote peer
Field Summary | |
---|---|
private IPaddr |
host
IP address |
private int |
port
Port |
Constructor Summary | |
---|---|
PeerID(IPaddr host,
int port)
Generate a new PeerID |
|
PeerID(java.lang.String host,
int port)
|
Method Summary | |
---|---|
IPaddr |
host()
Retrieve the IP address of the peer |
int |
port()
Retrieve the port of the peer |
void |
read(SerialIn in)
Serial read function |
void |
setHost(IPaddr host)
Set the IP address |
void |
setPort(int port)
Set the port |
int |
size()
Determine the size of this type |
java.lang.String |
toString()
Retrieve a string representation of this object |
void |
write(SerialOut out)
Serial read function |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private IPaddr host
private int port
Constructor Detail |
---|
public PeerID(IPaddr host, int port)
host
- Hostport
- Portpublic PeerID(java.lang.String host, int port) throws java.net.UnknownHostException
java.net.UnknownHostException
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public IPaddr host()
public int port()
public void setHost(IPaddr host)
host
- IP addresspublic void setPort(int port)
port
- Portpublic void read(SerialIn in) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
read
in interface Writable
in
- Input stream
java.io.IOException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public void write(SerialOut out) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, CTLException
write
in interface Writable
out
- Output stream
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
CTLException
public int size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |