Class SimulationCommandsParser

java.lang.Object
  extended byCommandsParser
      extended bySimulationCommandsParser

public class SimulationCommandsParser
extends CommandsParser

   
 Parser for the Simulator
 Simulator is interested in all commands
 


Constructor Summary
SimulationCommandsParser(Simulator simulator)
          Create a new parser
 
Method Summary
protected  void exit(java.lang.String[] cmd)
          Call manager.stop() if the command is exit.
protected  void parseNodeCmd(java.lang.String[] cmd)
           
 
Methods inherited from class CommandsParser
createNewEdge, failEdge, failNode, parseCommonCmds, parseFile, parseLine, parseRemainder, printStrArray, printStrArray, restartEdge, restartNode, skipLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimulationCommandsParser

public SimulationCommandsParser(Simulator simulator)
Create a new parser

Parameters:
simulator - The simulator that should be used to get messages to nodes, and be informaed about topology changes
Method Detail

parseNodeCmd

protected void parseNodeCmd(java.lang.String[] cmd)
Specified by:
parseNodeCmd in class CommandsParser

exit

protected void exit(java.lang.String[] cmd)
Description copied from class: CommandsParser
Call manager.stop() if the command is exit. Actually will accept exit followed by anything Thus "exit" and "exit blahblah" will both cause fishnet to exit. However "exitblahblah" will not.

Specified by:
exit in class CommandsParser