// BOOTP.java (C) K. J. Turner, K. A. Whyte 04/03/06 // Boot Protocol package protocol; // protocol package import java.util.Vector; // vector (list) import support.*; // protocol entity support public class BOOTP extends Protocol { // BOOTP protocol private BOOTPSender sender; // protocol sender (client) private BOOTPReceiver receiver; // protocol receiver (server) public BOOTP() { // construct protocol instance medium = new BOOTPMedium(); // construct comms medium sender = // construct sender (client) new BOOTPSender (medium, "Client"); receiver = // construct receiver (server) new BOOTPReceiver (medium, "Server"); sender.setPeer(receiver); // sender is receiver's peer receiver.setPeer(sender); // receiver is sender's peer entities = new Vector(); // initialise protocol entities entities.addElement(sender); // add sender protocol entity entities.addElement(medium); // add comms medium entity entities.addElement(receiver); // add receive protocol entity } }