Class modules.Script
All Packages Class Hierarchy This Package Previous Next Index
Class modules.Script
java.lang.Object
|
+----java.util.Dictionary
|
+----java.util.Hashtable
|
+----modules.Script
- public class Script
- extends Hashtable
- implements Module
A very simple scripting module. It takes pairs of pattern and text and
sends the corresponding text when the pattern matches. Each pattern is
only matched once.
- Scripts:
<PARAM NAME=script VALUE="pattern|text|...">
- A script contains of pairs of pattern and text strings.
If the pattern is matched against the output from the remote host,
the corresponding text will be sent. Each pattern will match only
once.
Thus it is possible to program an autologin as follows:
"login:|leo|Password:|mypassword|leo@www|ls"
Newlines will be added automatically to the string sent! At the
moment the order of the pattern and text pairs is not relevant.
- Version:
- $Id: Script.java,v 1.2 1997/03/05 17:04:27 leo Exp $
- Author:
- Matthias L. Jugel, Marcus Meißner
- See Also:
- Module
-
Script()
-
-
receive(String)
- This method is called when data is received.
-
setLoader(Object)
- Set the applet and configure script module.
Script
public Script()
setLoader
public void setLoader(Object o)
- Set the applet and configure script module. All parameters are read
off the PARAM list of the applet.
- Parameters:
- o - the object that is the applet (must be an Applet)
- See Also:
- Module, Applet
receive
public boolean receive(String s)
- This method is called when data is received. It tries to match the
input to the list of patterns and sends corresponding text on success.
- Parameters:
- s - The string to test.
- See Also:
- InputPeer
All Packages Class Hierarchy This Package Previous Next Index