com.limegroup.gnutella
Class EndpointData

java.lang.Object
  extended bycom.limegroup.gnutella.Endpoint
      extended bycom.limegroup.gnutella.EndpointData
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Serializable

public class EndpointData
extends Endpoint
implements java.lang.Cloneable, java.io.Serializable

See Also:
Serialized Form

Field Summary
static int DEFAULT_SPEED
          set the default speed to be 56k
 
Fields inherited from class com.limegroup.gnutella.Endpoint
processed
 
Constructor Summary
EndpointData(byte[] hostBytes, int port)
          Creates a new EndpointData instance
EndpointData(byte[] hostBytes, int port, long speed)
          Creates a new EndpointData instance
EndpointData(byte[] hostBytes, int port, long files, long kbytes)
          Creates a new EndpointData instance
EndpointData(Endpoint endpoint)
          Creates a new EndpointData instance from another endpoint
EndpointData(Endpoint endpoint, long speed)
          Creates a new EndpointData instance
EndpointData(java.lang.String hostname, int port)
          Creates a new EndpointData instance
 
Method Summary
 long getSpeed()
          returns the speed of the host
 void setSpeed(long speed)
          Sets the speed and clientGUID for the host this endpoint refers to
 
Methods inherited from class com.limegroup.gnutella.Endpoint
clone, compareTo, equals, getConnectivity, getFiles, getHostBytes, getHostname, getKbytes, getPort, getWeight, hashCode, isPrivateAddress, isSameSubnet, normalizeFilesAndSize, setConnectivity, setFiles, setHostname, setKbytes, setWeight, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_SPEED

public static final int DEFAULT_SPEED
set the default speed to be 56k

See Also:
Constant Field Values
Constructor Detail

EndpointData

public EndpointData(Endpoint endpoint)
Creates a new EndpointData instance from another endpoint

Parameters:
endpoint - from where to copy the fields

EndpointData

public EndpointData(java.lang.String hostname,
                    int port)
Creates a new EndpointData instance

Parameters:
hostname - Hostname of the node this endpoint refers to
port - The port number for the host

EndpointData

public EndpointData(byte[] hostBytes,
                    int port)
Creates a new EndpointData instance

Parameters:
hostBytes - IP address of the host (MSB first)
port - The port number for the host

EndpointData

public EndpointData(byte[] hostBytes,
                    int port,
                    long speed)
Creates a new EndpointData instance

Parameters:
hostBytes - IP address of the host (MSB first)
port - The port number for the host
speed - Spped in kbps of the host

EndpointData

public EndpointData(byte[] hostBytes,
                    int port,
                    long files,
                    long kbytes)
Creates a new EndpointData instance

Parameters:
hostBytes - IP address of the host (MSB first)
port - The port number for the host
files - the number of files the host has
kbytes - the size of all of the files, in kilobytes

EndpointData

public EndpointData(Endpoint endpoint,
                    long speed)
Creates a new EndpointData instance

Parameters:
endpoint - from where to copy the fields for the super class
speed - Speed of the host
Method Detail

getSpeed

public long getSpeed()
returns the speed of the host


setSpeed

public void setSpeed(long speed)
Sets the speed and clientGUID for the host this endpoint refers to

Parameters:
speed - Speed of the host