edu.UCL.xmiddle.host
Class UDPHost

java.lang.Object
  |
  +--edu.UCL.xmiddle.framework.host.Host
        |
        +--edu.UCL.xmiddle.host.UDPHost
Direct Known Subclasses:
SimpleLocalHost

public class UDPHost
extends Host

UDPHost.java A simple host representation for the UDP implementation of xmiddle. Apart from the Objects defined at Host, it contains the host's ip address and listening UDP port; Created: Mon Jul 30 12:12:23 2001


Field Summary
protected  java.lang.String primaryID
           
protected  java.lang.String secondaryID
           
 
Fields inherited from class edu.UCL.xmiddle.framework.host.Host
links
 
Constructor Summary
UDPHost(java.lang.String primaryID, java.lang.String secondaryID)
          Creates a new UDPHost instance.
UDPHost(java.lang.String primaryID, java.lang.String secondaryID, java.lang.String ipaddr, int port, int segmentSize)
          Creates a new UDPHost instance.
 
Method Summary
 java.lang.String getAddress()
          Returns this host current/last ip address
 int getPort()
          Returns this host listening port
 java.lang.Object getPrimaryID()
          Returns the primaryID of the host.
 java.lang.Object getSecondaryID()
          Returns the secondary ID of the host.
 int getSegmentSize()
          Returns the maximum number of bytes that this host can accept in one go
 
Methods inherited from class edu.UCL.xmiddle.framework.host.Host
getLinks, setLinks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

primaryID

protected java.lang.String primaryID

secondaryID

protected java.lang.String secondaryID
Constructor Detail

UDPHost

public UDPHost(java.lang.String primaryID,
               java.lang.String secondaryID)
Creates a new UDPHost instance.

Parameters:
primaryID - a String value
secondaryID - a String value

UDPHost

public UDPHost(java.lang.String primaryID,
               java.lang.String secondaryID,
               java.lang.String ipaddr,
               int port,
               int segmentSize)
Creates a new UDPHost instance.

Parameters:
primaryID - a String value
secondaryID - a String value
ipaddr - a String value
port - an int value
segmentSize - an int value
Method Detail

getPrimaryID

public java.lang.Object getPrimaryID()
Description copied from class: Host
Returns the primaryID of the host. The primaryID is an object (the exact type of which is left to the implementor) which uniquely identifies a host.

Specified by:
getPrimaryID in class Host
Returns:
The primaryID

getSecondaryID

public java.lang.Object getSecondaryID()
Description copied from class: Host
Returns the secondary ID of the host. The secondary ID is an object (the exact type of which is left to the implementor) which identifies a host non-uniquely. It is indended to represent the host in a human-readable name. Sort of like a "host name"

Specified by:
getSecondaryID in class Host
Returns:
The secondaryID

getAddress

public java.lang.String getAddress()
Returns this host current/last ip address

Returns:
a String value

getPort

public int getPort()
Returns this host listening port

Returns:
an int value

getSegmentSize

public int getSegmentSize()
Returns the maximum number of bytes that this host can accept in one go

Returns:
an int value