|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.writersforge.catalan.process.workers.WorkerRegistry
Container for all instantiated IWorker objects. Workers can be added as IWorker implementation Class references, as externally created IWorker objects, or as customized Workers derived from a IWorker class already in the registry but configured with custom parameters.
| Constructor Summary | |
WorkerRegistry()
Creates a new instance of WorkerRegistry. |
|
| Method Summary | |
void |
addClassWorker(java.lang.String name,
java.lang.Class workerClass,
IWorkProperties defaultProps)
Adds a newly instantiated IWorker of the given Class to the registry. |
void |
addCustomWorker(java.lang.String name,
java.lang.String origName,
IWorkProperties defaultProps)
Adds a IWorker to the registry, derived from a IWorker that already exists in the registry. |
void |
addExternalWorker(java.lang.String name,
IWorker worker,
IWorkProperties defaultProps)
Adds an externally created IWorker to the registry. |
IWorker |
getWorker(java.lang.String name)
Retrieves the named IWorker object from the registry. |
java.lang.String[] |
getWorkerNames()
Retrieves an array of all IWorker names in this registry. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WorkerRegistry()
| Method Detail |
public void addClassWorker(java.lang.String name,
java.lang.Class workerClass,
IWorkProperties defaultProps)
throws RegistryException
defaultProps parameter is non-null, it will be assigned
to the IWorker before putting it into the registry.
name - name of IWorker to be added to the registryworkerClass - implementation class of IWorkerdefaultProps - default properties for IWorker
RegistryException - if unable to instantiate IWorker class, or
if name is null or already exists
public void addExternalWorker(java.lang.String name,
IWorker worker,
IWorkProperties defaultProps)
throws RegistryException
defaultProps parameter is non-null, it will replace the
IWorker's old default properties.
name - name of IWorker to be added to the registryworker - previously instantiated IWorker objectdefaultProps - default properties for IWorker
RegistryException - if IWorker parameter is null, or
if name is null or already exists
public void addCustomWorker(java.lang.String name,
java.lang.String origName,
IWorkProperties defaultProps)
throws RegistryException
defaultProps. If any parameters with the same name collide,
the defaultProps values will take precedence in the new
IWorker.
name - name of IWorker to be added to the registryorigName - name of a IWorker already in the registrydefaultProps - default properties for IWorker
RegistryException - if name is null or already exists, or if
origName worker does not existpublic java.lang.String[] getWorkerNames()
public IWorker getWorker(java.lang.String name)
name - name of the IWorker to get
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||