org.owasp.orizon.twilight
Class Twilight

java.lang.Object
  extended by org.owasp.orizon.core.Trackable
      extended by org.owasp.orizon.core.Engine
          extended by org.owasp.orizon.twilight.Twilight

public class Twilight
extends Engine

Author:
thesp0nge

Field Summary
static int twilightNoIdentifiers
           
static int twilightNotFeed
           
static int twilightStartErrno
           
 
Fields inherited from class org.owasp.orizon.core.Engine
engineCantTrace, engineMissingTraceName, engineStartErrno, errno, errstr, faults, has_faults, has_output, initialized, inputName, O_E_DELIVER, O_E_ERROR, O_E_IDLE, O_E_PAUSED, O_E_READY, O_E_RUNNING, O_E_STOPPED, prompt, ps1, reader, rules, s, silence, status, t0, t1, time
 
Fields inherited from class org.owasp.orizon.core.Trackable
trace, traceName
 
Constructor Summary
Twilight()
           
Twilight(java.lang.String name)
           
 
Method Summary
 boolean exec(java.lang.String command)
          Engine specific execute command routine.
 boolean init()
          Initialize the engine.
 boolean pause()
          Pause the engine.
protected  boolean process(java.lang.Object n)
          Engine specific freecc tree generated root node management routine.
 boolean setIdentifiers(java.util.Vector<Call> i)
           
 boolean shell()
          Engine specific interactive shell.
 boolean start()
          Starts the Twilight engine
 boolean stop()
          Stop the engine.
 
Methods inherited from class org.owasp.orizon.core.Engine
addFault, canOutput, canPause, canRun, canStop, debug, errorString, exitOnFailure, feed, getAppName, getElapsedStatement, getErrno, getFaults, getProperties, getScanMills, getStats, getTimer, hasFaults, hasOutput, isPaused, isRunning, isStopped, isTestMode, isTurnedOn, pauseTimer, reset, resetTimer, setAppName, setErrorString, setProperties, setReader, setStats, setTestMode, startTimer, stopTimer
 
Methods inherited from class org.owasp.orizon.core.Trackable
getTraceName, isTrace, setTrace, setTraceName, trace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

twilightStartErrno

public static final int twilightStartErrno
See Also:
Constant Field Values

twilightNotFeed

public static final int twilightNotFeed
See Also:
Constant Field Values

twilightNoIdentifiers

public static final int twilightNoIdentifiers
See Also:
Constant Field Values
Constructor Detail

Twilight

public Twilight()

Twilight

public Twilight(java.lang.String name)
Method Detail

exec

public boolean exec(java.lang.String command)
Description copied from class: Engine
Engine specific execute command routine. Each engine has to be able to receive commands from the outside (the shell o the SkyLine object), process them and giving back a result. This method will executes a command.

Specified by:
exec in class Engine
Parameters:
command - the command to execute
Returns:
true if the command has been executed, or false otherwise

setIdentifiers

public boolean setIdentifiers(java.util.Vector<Call> i)

init

public boolean init()
Description copied from class: Engine
Initialize the engine. The initialization status must be stored in the initialized variable.

Specified by:
init in class Engine
Returns:
true if the engine can be initialized, or false otherwise.

pause

public boolean pause()
Description copied from class: Engine
Pause the engine.

Specified by:
pause in class Engine
Returns:
true if the engine can be paused, or false otherwise.

process

protected boolean process(java.lang.Object n)
Description copied from class: Engine
Engine specific freecc tree generated root node management routine. This method will be called in exec() or shell() method giving the root node from the tree generated by each engine parser.

Specified by:
process in class Engine
Parameters:
n - the root node
Returns:
true or false if the caller routine has to exit upon return.

shell

public boolean shell()
Description copied from class: Engine
Engine specific interactive shell. OSH will permit users to interact with Orizon engines direct issuing them commands. For such a reason an interactive shell needs to be spawned.

Specified by:
shell in class Engine
Returns:
true if the shell can be spawned, or false otherwise.

start

public boolean start()
Starts the Twilight engine

Specified by:
start in class Engine
Returns:
true if the Twilight engine can be started, or false otherwise.

stop

public boolean stop()
Description copied from class: Engine
Stop the engine. Freeze engine's activities preparing it to release results.

Specified by:
stop in class Engine
Returns:
true if the engine can be stopped, or false otherwise