Class Host

java.lang.Object
  |
  +--Host

public class Host
extends Object

Model of a network host.

Version:
2002-04-11
Author:
Max Hailperin

Constructor Summary
Host()
          Constructor for objects of class Host
 
Method Summary
 void connect(Port peer)
          connects this Host's Port to another Port
 void disconnect()
          disconnects this Host's Port
 int getAddress()
          returns the Host's (Port's) address
 Port getPort()
          returns the Host's Port
 void transmit(Message m)
          transmits a Message
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Host

public Host()
Constructor for objects of class Host
Method Detail

connect

public void connect(Port peer)
connects this Host's Port to another Port
Parameters:
peer - specifies the other Port to connect to

disconnect

public void disconnect()
disconnects this Host's Port

getAddress

public int getAddress()
returns the Host's (Port's) address
Returns:
the Host's (Port's) address

getPort

public Port getPort()
returns the Host's Port
Returns:
the Host's Port

transmit

public void transmit(Message m)
transmits a Message
Parameters:
m - the Message to transmit


Generated by BlueJ