com.waveset.adapter.ScriptedConnection
Class Script

java.lang.Object
  extended bycom.waveset.adapter.ScriptedConnection.Script

public class Script
extends java.lang.Object

A series of ScriptTokens that can be executed on a ScriptedConnection to perform some remote function. Currently a script can only be run through once, since it has a built in iterator. Also, tokens should not be added after iteration has begun.


Field Summary
static java.lang.String code_id
           
 
Constructor Summary
Script()
           
 
Method Summary
 boolean addAll(Script script)
           
 void addToken(ScriptToken token)
          Add a ScriptToken to the Script.
 boolean hasNextToken()
          Deprecated. Not thread safe! Returns true if there are more ScriptTokens in the Script. Automatically creates the iterator if it hasn't been built yet.
 java.util.Iterator iterator()
           
 ScriptToken nextToken()
          Deprecated. Not thread safe! Returns the next token, or null if none left.
 ScriptToken nextToken(java.util.Iterator i)
           
 int size()
          Returns the total number of ScriptTokens in the Script.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

Script

public Script()
Method Detail

addToken

public void addToken(ScriptToken token)
Add a ScriptToken to the Script. All tokens should be added before beginning iteration.


addAll

public boolean addAll(Script script)
Parameters:
script - the script whose tokens should be added to this script's tokens.
Returns:
true if any tokens were added.

hasNextToken

public boolean hasNextToken()
Deprecated. Not thread safe! Returns true if there are more ScriptTokens in the Script. Automatically creates the iterator if it hasn't been built yet.


nextToken

public ScriptToken nextToken()
Deprecated. Not thread safe! Returns the next token, or null if none left.


nextToken

public ScriptToken nextToken(java.util.Iterator i)

iterator

public java.util.Iterator iterator()

size

public int size()
Returns the total number of ScriptTokens in the Script.