SPONSORED LINKS

modules
Interface Module

All Known Implementing Classes:
BSXModule, TextLabel, MudConnector, Script, ButtonBar

public abstract interface Module

Modules must implement this interface to be detected as valid modules

Version:
$Id: Module.html,v 1.1.1.1 2005/09/25 22:40:20 rswindell Exp $
Author:
Matthias L. Jugel, Marcus Meißner

Method Summary
 void connect(java.lang.String host, int port)
          Connected to the remote host.
 void disconnect()
          Disconnect from the host.
 java.lang.String receive(java.lang.String s)
          Receive data from somewhere.
 void setLoader(java.lang.Object loader)
          Set the loader of the module.
 

Method Detail

setLoader

public void setLoader(java.lang.Object loader)
Set the loader of the module. This is necessary to know if you want to contact the modules parent.
Parameters:
loader - The object that has loaded this module.

connect

public void connect(java.lang.String host,
                    int port)
Connected to the remote host. This method notifies upon new connection.
Parameters:
host - remote hostname
port - remote port

disconnect

public void disconnect()
Disconnect from the host. This method notifies of lost connection.

receive

public java.lang.String receive(java.lang.String s)
Receive data from somewhere. If a modules does not want to receive data it should return null to remove itself from the list of receiver modules.
Parameters:
s - The string we receive.
Returns:
the modified string or null (to remove from receiver list)