dcf.server
Class AutoLoader

dcf.server.AutoLoader

public class AutoLoader

Used by the Distributer to automatically load tasks defined by the auto deployment descriptor file (autodeploy.xml) located in the location stated by the dcf.xml file. The autodeploy.xml file should contain groups of tasks to deploy. An example would be:


 <?xml version="1.0"?>
 <autodeploy>
  <group>
    <task>dcf.tasks.RandomizerTask</task>
    <solver>dcf.tasks.RandomizerSolver</solver>
  </group>
  <group>
    <task>dcf.tasks.HTMLCrawlerTask</task>
    <solver>dcf.tasks.HTMLCrawlerSolver</solver>
  </group>
 </autodeploy>

 
This will load the Server with the RandomizerTask and HTMLCrawlerTask.
As classes are loaded using the Class.forName() method the Task and Solver can be located anywhere in the classpath. Note, however, that the files should also be reachable by the ClassServer to be served to clients.
Important: The implementation of this class uses the JDOM XML library, avaiable at http://www.jdom.org.

Author:
Tal Salmona

Constructor Summary
AutoLoader()
           
 
Method Summary
 dcf.server.Hashtable getCounts()
           
 dcf.server.Hashtable getTasks()
           
 

Constructor Detail

AutoLoader

public AutoLoader()
Method Detail

getTasks

public dcf.server.Hashtable getTasks()
Returns:
The Hashtable of Task-Solver pairs to be loaded.

getCounts

public dcf.server.Hashtable getCounts()
Returns:
The Hashtable of Task and the number of times it should be loaded.




Distributed Computation Framework