jason.core
Class AbstractComponentFactory

java.lang.Object
  |
  +--jason.core.AbstractComponentFactory

public abstract class AbstractComponentFactory
extends java.lang.Object

Abstract factory for the Server component. Each main element of the AWS server is provided by this class. It hides how the element are found. Singleton mechanism is used for minimized element allocation. To work correctly, the ComponentFactory need to know how to instantiate each element. The Server Config is a configuration element that provide information for this factory.

Since:
1.0

Field Summary
protected  ServiceConfig config
           
 
Constructor Summary
AbstractComponentFactory(ServiceConfig config)
          Store the ServerConfig element
 
Method Summary
 java.lang.Object getComponent(java.lang.String name)
           
protected  void loadComponents()
           
protected  void setComponent(java.lang.String name, java.lang.Object component)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

protected ServiceConfig config
Constructor Detail

AbstractComponentFactory

public AbstractComponentFactory(ServiceConfig config)
                         throws ConfigException
Store the ServerConfig element

Parameters:
config - a ServerConfig value
Throws:
ConfigException - if an error occurs
Method Detail

loadComponents

protected void loadComponents()
                       throws ConfigException
ConfigException

setComponent

protected final void setComponent(java.lang.String name,
                                  java.lang.Object component)

getComponent

public java.lang.Object getComponent(java.lang.String name)