autohit.call.modules
Class TextReaderModule

java.lang.Object
  extended byautohit.call.modules.Module
      extended byautohit.call.modules.TextReaderModule

public class TextReaderModule
extends Module

Text reader module. It'll supply lines or tokens out of a text source. The source can be a String or a Universe object. If you start a new session over an old one, it will throw a fault. You must call done() first.

startstring(string) start a read on a target string
startuni(objname) start a read on a universe object
line() get the next full line. if reading tokens in a line, it will give the whole contents of the current line.
token() get the next whitespace delimited token. if there are no more tokens in the current line, it will eat lines until it finds one.
hasmore() return "true" if there are more tokens and/or lines, else false.
done() close read (do this for either type, please)

Version:
1.0 Version History EPG - Initial - 7Jul03
Author:
Erich P. Gatejen

Field Summary
 
Fields inherited from class autohit.call.modules.Module
myName, visCore, visLogger, visSC, visUniverse
 
Constructor Summary
TextReaderModule()
          Constructor
 
Method Summary
 java.lang.Object execute_chain(java.lang.String name)
          Execute a named method.
protected  void free_chain()
          Allow the subclass a chance to cleanup on free.
protected  java.lang.String instantiation_chain()
          Allow the subclass a chance to initialize.
 
Methods inherited from class autohit.call.modules.Module
buildException, buildException, debug, desired, desiredType, error, errorparam, execute, fault, fault, free, getParam, getPersist, instance, isDebugging, log, optional, optionalType, required, requiredType, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextReaderModule

public TextReaderModule()
Constructor

Method Detail

execute_chain

public java.lang.Object execute_chain(java.lang.String name)
                               throws CallException
Execute a named method. You must implement this method. You can call any of the helpers for data and services. The returned object better be a string (for now).

Specified by:
execute_chain in class Module
Parameters:
name - name of the method
Throws:
CallException
See Also:
NOPair

instantiation_chain

protected java.lang.String instantiation_chain()
                                        throws CallException
Allow the subclass a chance to initialize. At a minium, an implementor should create an empty method.

Specified by:
instantiation_chain in class Module
Returns:
the name
Throws:
CallException

free_chain

protected void free_chain()
                   throws CallException
Allow the subclass a chance to cleanup on free. At a minium, an implementor should create an empty method.

Specified by:
free_chain in class Module
Throws:
CallException


Test.