Class modules.MudConnector
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class modules.MudConnector

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----modules.MudConnector

public class MudConnector
extends Panel
implements Module, Runnable
A specially designed module for the MUD Connector. It loads a list of MUDs via http and displays them in a list box to be selected. A selected MUD can then be entered.
MudConnector parameterfile:
<PARAM NAME=MUDlist VALUE="url">
The url of the Mudlist. This url MUST be located on the same web server as the applet!
Version:
$Id: MudConnector.java,v 1.2 1997/04/14 09:43:48 leo Exp $
Author:
Matthias L. Jugel, Marcus Meißner
See Also:
Module

Constructor Index

 o MudConnector()

Method Index

 o addNotify()
when newly added try to load the mudlist using the parameter "mudlist"
 o connect(String, int)
dummy methods
 o disconnect()
 o handleEvent(Event)
handle list selection, connect, disconnect and refresh button
 o receive(String)
 o run()
The body of the thread opens a URLConnection with the address given as parameter "mudlist" and downloads it.
 o setLoader(Object)
setLoader() is called upon start of the parent applet.

Constructors

 o MudConnector
  public MudConnector()

Methods

 o setLoader
  public void setLoader(Object loader)
setLoader() is called upon start of the parent applet. This method initializes the GUI of the module, e.g the list and buttons.
Parameters:
loader - the parent applet
 o addNotify
  public void addNotify()
when newly added try to load the mudlist using the parameter "mudlist"
Overrides:
addNotify in class Panel
 o run
  public void run()
The body of the thread opens a URLConnection with the address given as parameter "mudlist" and downloads it. It expects a tabulator separated list and the amount of muds in the file at the beginning of the file.
 o handleEvent
  public boolean handleEvent(Event evt)
handle list selection, connect, disconnect and refresh button
Parameters:
evt - the event to process
Overrides:
handleEvent in class Component
 o connect
  public void connect(String host,
                      int port)
dummy methods
 o disconnect
  public void disconnect()
 o receive
  public String receive(String str)

All Packages  Class Hierarchy  This Package  Previous  Next  Index