org.apache.droids.helper.factories
Class GenericFactory<T>

Package class diagram package GenericFactory
java.lang.Object
  extended by org.apache.droids.helper.factories.GenericFactory<T>
Direct Known Subclasses:
DroidFactory, HandlerFactory, ParserFactory, ProtocolFactory, URLFiltersFactory

public class GenericFactory<T>
extends Object

Basically all factories till now extend this generic factory. The core is a simple Map.


Field Summary
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
GenericFactory()
           
 
Method Summary
 Map<String,T> getMap()
          Get the register which contains all components.
 T resolve(String name)
          Will lookup which component is linked to the name and will return it.
 void setMap(Map map)
          Set the register which contains all components.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.commons.logging.Log log
Constructor Detail

GenericFactory

public GenericFactory()
Method Detail

getMap

public Map<String,T> getMap()
Get the register which contains all components.

Returns:
the register which contains all components

setMap

public void setMap(Map map)
Set the register which contains all components.

Parameters:
map - the register which contains all components.

resolve

public T resolve(String name)
Will lookup which component is linked to the name and will return it.

Parameters:
name - -the name of the component you need.
Returns:
plugin to process the job.


Copyright © 2008 The Apache Software Foundation