edu.gwu.simplenetsim
Interface WebBrowser


public interface WebBrowser

This interface must be implemented by a web browser.


Method Summary
 void display()
          The simulator calls this method, asking the browser to display itself in a frame by itself.
 void init(int nodeNum, TransportLayer transport, int portNum)
          Initialization includes the node's ID, port number (usually 80), and the transport layer.
 boolean isDisplayed()
          Is the browser displayed? We use this to check, in case the user has closed the window.
 void transmitSTTPRequest()
          Method transmitSTTPRequest is called by the simulator to ask the browser whether it needs to transmit an STTP request to layers below.
 

Method Detail

init

void init(int nodeNum,
          TransportLayer transport,
          int portNum)
Initialization includes the node's ID, port number (usually 80), and the transport layer.

Parameters:
nodeNum - an int value
transport - a TransportLayer value
portNum - an int value

transmitSTTPRequest

void transmitSTTPRequest()
Method transmitSTTPRequest is called by the simulator to ask the browser whether it needs to transmit an STTP request to layers below. The reason the simulator needs to keep calling this is to allow a browser to call isReady() in the transport layer, which checks whether a connection has been set up.


display

void display()
The simulator calls this method, asking the browser to display itself in a frame by itself.


isDisplayed

boolean isDisplayed()
Is the browser displayed? We use this to check, in case the user has closed the window.

Returns:
a boolean value