org.apache.droids
Class Core

Package class diagram package Core
java.lang.Object
  extended by org.apache.droids.Core

public class Core
extends Object

Core configuration mainly holding the different factories we are using.


Constructor Summary
Core()
           
 
Method Summary
 Droid getDroid(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(String name)
          Start a given Droid.
static void threadMessage(String message)
          Since we are using for now exclusively the command line, the method should be use to send message to the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Core

public Core()
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(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(String name)
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

threadMessage

public static void threadMessage(String message)
Since we are using for now exclusively the command line, the method should be use to send message to the user.

Parameters:
message - the message you want to send

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 © 2008 The Apache Software Foundation