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

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

public class GenericFactory<T>
extends Loggable

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

Version:
1.0

Field Summary
 
Fields inherited from class org.apache.droids.helper.Loggable
log
 
Constructor Summary
GenericFactory()
           
 
Method Summary
 java.util.Map<java.lang.String,T> getMap()
          Get the register which contains all components.
 T resolve(java.lang.String name)
          Will lookup which component is linked to the name and will return it.
 void setMap(java.util.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
 

Constructor Detail

GenericFactory

public GenericFactory()
Method Detail

getMap

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

Returns:
the register which contains all components

setMap

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

Parameters:
map - the register which contains all components.

resolve

public T resolve(java.lang.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 © 2007-2009. All Rights Reserved.