edu.ntnu.item.jt.system
Class Connector
java.lang.Object
edu.ntnu.item.jt.system.Connector
public class Connector
- extends Object
Responsible for instantiating useful objects based on configbeans created
by the PowerScan XMLParser.
- Author:
- Jøran Vagnby Lillesand
- See Also:
XMLParser
,
edu.ntnu.item.jt.system.configbeans
Constructor Summary |
Connector(File xmlConfig)
Constructor for the connector class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Connector
public Connector(File xmlConfig)
throws InvalidFileException,
ParserException
- Constructor for the connector class. Accepts a XML file as input, parses the data using the XMLParser class and
instantiates the appropriate classes. Requires the XMLParser to output configuration beans.
Note that this constructor also performs several operations on the instantiated classes:
- VMWare servers are connected to.
- Virtual Machines (guest os') are loaded, powered on and logged in to.
- If no snapshot exists for a given VM in advance, one is taken.
- Scanner objects are instantiated and have their relevant parameters set.
- Filters are added to scanners
- Parameters:
xmlConfig
- file containing the XML structured PowerScan config.
- Throws:
InvalidFileException
- if the config file can not be read.
ValidationException
- if the config file fails DTD vaildation.
ParserException
- if parsing of the XML file fails.- See Also:
XMLParser
,
edu.ntnu.item.jt.system.configbeans
getScanners
public ArrayList<Scanner> getScanners()
- Getter for the scanner array list.
Note that the scanners are associated with the necessary parameters (including guest OS) and ready for use.
- Returns:
- list of scanners instantiated following parsing of the config file.
getExecutors
public ArrayList<Executor> getExecutors()