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 |
---|
void init(int nodeNum, TransportLayer transport, int portNum)
nodeNum
- an int
valuetransport
- a TransportLayer
valueportNum
- an int
valuevoid transmitSTTPRequest()
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.
void display()
boolean isDisplayed()
boolean
value