org.apache.droids.dynamic
Class DroidsConfig

java.lang.Object
  extended by org.apache.droids.dynamic.DroidsConfig

public class DroidsConfig
extends java.lang.Object

Core configuration mainly holding the different factories we are using.

Version:
1.0

Constructor Summary
DroidsConfig()
           
 
Method Summary
 Droid getDroid(java.lang.String name)
          Return the droid we want to use identified by the given name.
 URLFiltersFactory getFiltersFactory()
          Returns the filtersFactory that knows all registered filters.
 HandlerFactory getHandlerFactory()
          Returns the handlerFactory that knows all registered handlers.
 ParserFactory getParserFactory()
          Returns the parserFactory that knows all registered parser.
 ProtocolFactory getProtocolFactory()
          Returns the protocolFactory that knows all registered protocol.
 void setDroids(DroidFactory droids)
          Set the droidsFactory we are using.
 void setFiltersFactory(URLFiltersFactory filtersFactory)
          Set the pre-configured filtersFactory that knows all registered filters.
 void setHandlerFactory(HandlerFactory handlerFactory)
          Set the pre-configured handlerFactory that knows all registered handlers.
 void setParserFactory(ParserFactory parserFactory)
          Set the pre-configured parserFactory that knows all registered parser.
 void setProtocolFactory(ProtocolFactory protocolFactory)
          Set the pre-configured protocolFactory that knows all registered protocol.
 void start(java.lang.String name)
          Start a given Droid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DroidsConfig

public DroidsConfig()
Method Detail

setDroids

public void setDroids(DroidFactory droids)
Set the droidsFactory we are using. This is the core component that knows all registered droids that the application offers.

Parameters:
droids -
See Also:
DroidFactory

getDroid

public Droid getDroid(java.lang.String name)
Return the droid we want to use identified by the given name. Will contact the droidsFactory and looks up the droid.

Parameters:
name - the name of the droid we want to use
Returns:
The droid that is identified by the name
See Also:
DroidFactory

getProtocolFactory

public ProtocolFactory getProtocolFactory()
Returns the protocolFactory that knows all registered protocol.

Returns:
protocolFactory that knows all registered protocol.
See Also:
ProtocolFactory

setProtocolFactory

public void setProtocolFactory(ProtocolFactory protocolFactory)
Set the pre-configured protocolFactory that knows all registered protocol.

Parameters:
protocolFactory - pre-configured protocolFactory
See Also:
ProtocolFactory

start

public void start(java.lang.String name)
           throws DroidsException
Start a given Droid. First we will look up the droid identified by the given name and then start it.

Parameters:
name - the name of the droid we want to use
Throws:
DroidsException

getParserFactory

public ParserFactory getParserFactory()
Returns the parserFactory that knows all registered parser.

Returns:
parserFactory that knows all registered parser.
See Also:
ParserFactory

setParserFactory

public void setParserFactory(ParserFactory parserFactory)
Set the pre-configured parserFactory that knows all registered parser.

Parameters:
parserFactory - pre-configured parserFactory
See Also:
ParserFactory

getFiltersFactory

public URLFiltersFactory getFiltersFactory()
Returns the filtersFactory that knows all registered filters.

Returns:
filtersFactory that knows all registered filters.
See Also:
URLFiltersFactory

setFiltersFactory

public void setFiltersFactory(URLFiltersFactory filtersFactory)
Set the pre-configured filtersFactory that knows all registered filters.

Parameters:
filtersFactory - filtersFactory that knows all registered filters.
See Also:
URLFiltersFactory

getHandlerFactory

public HandlerFactory getHandlerFactory()
Returns the handlerFactory that knows all registered handlers.

Returns:
handlerFactory that knows all registered handlers.
See Also:
HandlerFactory

setHandlerFactory

public void setHandlerFactory(HandlerFactory handlerFactory)
Set the pre-configured handlerFactory that knows all registered handlers.

Parameters:
handlerFactory - pre-configured handlerFactory that knows all registered handlers.
See Also:
HandlerFactory


Copyright © 2007-2009. All Rights Reserved.