Object <- IPSwitch |
|
|
AttachDataLink DetachDataLink FindActiveDataLink HandlePDU NotifyNetworkChange RegisterForNetworkEvents ReinitializeClass WritePDU |
|
Enabled Enabled |
| Field | Type | |
|---|---|---|
| PDUServiceInterface: | enabled: | Boolean |
| IPSwitch: | daemon: | IPDaemon |
| notifyList: | DenseObjectList |
instance IPSwitch tag; enabled: false; daemon: nilObject; notifyList: nilObject; end instance;
// // IP multiplexer class // Define Class IPSwitch; inherits from Object; inherits from PDUClientInterface; inherits from PDUServiceInterface; field daemon: IPDaemon, weak; // Actor used for periodic IP tasks. Only exists while IP is // in use. field notifyList: DenseObjectList; // List of objects wanting to be notified of the data link // going up or down. overrides Enabled; // Returns true if IP is active. overrides SetEnabled; // DO NOT USE (enabled state is read only). operation AttachDataLink(dataLink: DataLinkServer; provider: InternetProvider); // Attach the active data link (connected to the given InternetProvider) // to the IP switch. operation DetachDataLink(dataLink: DataLinkServer); // Remove the data link from the IP switch. operation FindActiveDataLink(provider: InternetProvider): DataLinkServer; // Find an active data link that is connected to the given InternetProvider; // passing nilObject returns the first active data link found. operation RegisterForNetworkEvents(irritant: Object; add: Boolean); // Registers a WantNetworkEvents subclass for notification of // network events. Applications should not need to call this // method directly since WantsNetworkEvents automatically // registers the object during Init, Reinitialize, and Copy. // Only call this if you have specifically overriden these // methods and wish to register the objects manually. operation NotifyNetworkChange(dataLink: DataLinkServer; up: Boolean); // Sends out notifications to all objects registered to // receive network events. The "dataLink" should be the link // server which is either coming up or going down, and "up" // specifies which of the two events are happening. overrides WritePDU; // Send an assembled packet via IP. // // NOTE: this operation is only for use by transport layer // protocols (e.g. TCP and UDP). Applications software should // not use this method to send data; use the transport // protocol APIs instead. overrides ReinitializeClass; overrides HandlePDU; end class;