|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcgl.narada.protocol.Connection
public class Connection
Provides a serialized list of the connections in the system. The class performs a variety of utility functions. These include representation of a connection within the connectivity graph of the hosting node as a connection that would be consistent with another nodes view of the system.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
Connection(NodeAddress nodeAddress,
byte[] connectionBytes)
This represents an unmarshalling of the connection information that is received over the link. |
|
Connection(NodeAddress thisNodeAddress,
NodeAddress nodeOne,
int levelOne,
NodeAddress nodeTwo,
int levelTwo,
int gatewayLevel,
ProtocolID connectionId)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Compares two objects for equality. |
ProtocolID |
getConnectionId()
Returns the connectionID associated with the connection. |
int |
getGatewayLevel()
Returns the level of this gateway. |
int |
getLevelOne()
Returns the level associated with first node in the connection |
int |
getLevelTwo()
Returns the level associated with second node in the connection |
NodeAddress |
getNodeOne()
Returns the first node in the connection |
NodeAddress |
getNodeTwo()
Returns the second node in the connection |
int |
hashCode()
Generates a hash code for the receiver. |
static void |
main(String[] args)
|
byte[] |
snapshotConnectionInfo(int level)
This is a marshalling of the connection information to be sent over a link. |
String |
toString()
A string representation of the connection |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Connection(NodeAddress thisNodeAddress,
NodeAddress nodeOne,
int levelOne,
NodeAddress nodeTwo,
int levelTwo,
int gatewayLevel,
ProtocolID connectionId)
thisNodeAddress - - The Node address of the node hosting a specific
connectivity graph.nodeOne - - Node Address of the first entity of the gateway.levelOne - - The level of nodeOne.nodeTwo - - Node Address of the second entity of the gateway.levelTwo - - The level of nodeTwo.gatewayLevel - - The gateway level
public Connection(NodeAddress nodeAddress,
byte[] connectionBytes)
nodeAddress - - The node address of the server node hosting the
connectivity graph.connectionBytes - - A marshalled stream of bytes representing a
connection.| Method Detail |
|---|
public ProtocolID getConnectionId()
public NodeAddress getNodeOne()
public int getLevelOne()
public NodeAddress getNodeTwo()
public int getLevelTwo()
public int getGatewayLevel()
public byte[] snapshotConnectionInfo(int level)
level - - The level of the gateway over which this connection
information needs to be sent over.
public String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectobj - the Object to compare with
Hashtablepublic int hashCode()
hashCode in class Objectpublic static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||