example.hot
Class InetCoordinates

java.lang.Object
  extended by example.hot.InetCoordinates
All Implemented Interfaces:
java.lang.Cloneable, Protocol

public class InetCoordinates
extends java.lang.Object
implements Protocol

This class does nothing. It is simply a container inside each node to collect peer coordinates.

The actual "who knows whom" relation (the topology) container is decoupled from the HOT package. It is maintained by any Linkable implementing protocol declared in the config file.


Constructor Summary
InetCoordinates(java.lang.String prefix)
          Standard constructor that reads the configuration parameters.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of the protocol.
 double getX()
           
 double getY()
           
 void setX(double x)
           
 void setY(double y)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InetCoordinates

public InetCoordinates(java.lang.String prefix)
Standard constructor that reads the configuration parameters. Invoked by the simulation engine. By default, all the coordinates components are set to -1 value. The InetInitializer class provides a coordinates initialization.

Parameters:
prefix - the configuration prefix for this class.
Method Detail

clone

public java.lang.Object clone()
Description copied from interface: Protocol
Returns a clone of the protocol. It is important to pay attention to implement this carefully because in peersim all nodes are generated by cloning except a prototype node. That is, the constructor of protocols is used only to construct the prototype. Initialization can be done via Controls.

Specified by:
clone in interface Protocol
Overrides:
clone in class java.lang.Object

getX

public double getX()

setX

public void setX(double x)

getY

public double getY()

setY

public void setY(double y)