|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcgl.narada.protocol.NodeAddress
public class NodeAddress
The protocol layers deal only with the logical addresses associated with the nodes (be they clients or servers). This class maintains information regarding a nodes address. Utilitiy functions include accessor functions which can get information regarding a nodes address in terms of bytes or ints.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
NodeAddress(byte[] addressInBytes)
|
|
NodeAddress(byte[] addressInBytes,
boolean isClientAddress)
This is to construct a node address specific to client connections. |
|
NodeAddress(int[] addressInInts)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Compares two objects for equality. |
byte[] |
getAddressInBytes()
Accessor function to get the node address as a sequence of bytes |
int[] |
getAddressInInts()
Accessor function to get the node address as a sequence of ints |
int |
hashCode()
Generates a hash code for the receiver. |
static void |
main(String[] args)
|
String |
toString()
This method is implemented to enable a System.out.println() on the node's address. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NodeAddress(byte[] addressInBytes)
public NodeAddress(int[] addressInInts)
public NodeAddress(byte[] addressInBytes,
boolean isClientAddress)
| Method Detail |
|---|
public byte[] getAddressInBytes()
public int[] getAddressInInts()
public boolean equals(Object obj)
equals in class Objectobj - the Object to compare with
Hashtablepublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||