|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.chaosserver.bilbo.task.TaskFactory
Factory class to produce instance of Task objects for task names.
Field Summary | |
protected static TaskFactory |
self
Self reference for singleton. |
protected static String |
SYNC
Sync object for instance. |
protected Map |
taskMap
Holds the map of task name to task class names. |
Constructor Summary | |
protected |
TaskFactory()
Default constructor. |
Method Summary | |
Task |
createTask(String taskName,
Settings settings)
Creates a new instance of the task object associated with the taskName given. |
static TaskFactory |
getInstance()
Gets the singleton instance of the TaskFactory. |
protected Map |
getTaskMap()
Getter for the taskMap property. |
protected void |
loadTaskMap()
Loads the taskMap property from file. |
protected void |
setTaskMap(Map taskMap)
Setter for the taskMap property. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static TaskFactory self
protected static final String SYNC
protected Map taskMap
Constructor Detail |
protected TaskFactory()
Method Detail |
public static TaskFactory getInstance()
protected Map getTaskMap()
protected void setTaskMap(Map taskMap)
taskMap
- the taskMap propertyprotected void loadTaskMap()
public Task createTask(String taskName, Settings settings) throws NoSuchTaskException, TaskCreationException
taskName
- the name of the task object to createsettings
- the settings of this instance of the program
NoSuchTaskException
- if there is not task for the task name given
TaskCreationException
- if there is an error instantiating the task
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |