Class EmulationCommandsParser

  extended by CommandsParser
      extended by EmulationCommandsParser

public class EmulationCommandsParser
extends CommandsParser

 Parser for the Emulator
 Emulator is interested in all commands except topology commands

Constructor Summary
EmulationCommandsParser(Emulator emulator)
          Create a new parser
Method Summary
protected  void exit(java.lang.String[] cmd)
          Call manager.stop() if the command is exit.
 long parseLine(java.lang.String line, long now)
          Process one line of topology file or keyboard input.
protected  void parseNodeCmd(java.lang.String[] cmd)
Methods inherited from class CommandsParser
createNewEdge, failEdge, failNode, parseCommonCmds, parseFile, 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


public EmulationCommandsParser(Emulator emulator)
Create a new parser

emulator - The emulator that should be used to get messages to nodes
Method Detail


public long parseLine(java.lang.String line,
                      long now)
Process one line of topology file or keyboard input.

parseLine in class CommandsParser
line - A command line.
now - The current time in microseconds
How long to defer further processing. Returns -1 if do not have to defer


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


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