You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
875 B
Java
35 lines
875 B
Java
// HTTPSender.java
|
|
|
|
package protocol; // protocol package
|
|
|
|
import java.util.*; // import Java utility classes
|
|
|
|
import support.*; // import Jasper support classes
|
|
|
|
/**
|
|
This is the main class for simulation of HTTP.
|
|
|
|
@author Kenneth J. Turner, Kenneth A. Whyte
|
|
@version 1.4 (9th March 2006, KJT/KAW): initial version
|
|
<br/> 1.5 (19th July 2010, KJT): minor tidying
|
|
*/
|
|
|
|
public class HTTP extends Protocol {
|
|
|
|
private HTTPSender sender;
|
|
private HTTPReceiver receiver;
|
|
|
|
public HTTP() {
|
|
medium = new Medium();
|
|
sender = new HTTPSender(medium, "Client");
|
|
receiver = new HTTPReceiver(medium, "Server");
|
|
sender.setPeer(receiver);
|
|
receiver.setPeer(sender);
|
|
entities = new Vector<ProtocolEntity>();
|
|
entities.addElement(sender);
|
|
entities.addElement(medium);
|
|
entities.addElement(receiver);
|
|
}
|
|
|
|
}
|