org.micropsi.comp.agent
Class AgentFrameworkComponent

java.lang.Object
  extended byorg.micropsi.comp.common.AbstractComponent
      extended byorg.micropsi.comp.agent.AgentFrameworkComponent
All Implemented Interfaces:
ActiveComponentIF, java.lang.Runnable

public class AgentFrameworkComponent
extends AbstractComponent
implements ActiveComponentIF


Field Summary
 
Fields inherited from class org.micropsi.comp.common.AbstractComponent
clients, config, consoleService, exproc, logger, prefixKey, runner, servers
 
Constructor Summary
AgentFrameworkComponent()
           
 
Method Summary
 java.lang.Thread getAgentThread()
          Returns the Agent thread
 int getInnerType()
           
protected  long getNextTicket()
          Returns the next action ticket.
 void initializeWorldAdapters()
          Loads and initializes the world adapters, creating action and percept descriptors.
protected  void performInitialisation()
          Initializes the agent framework.
 void registerAdditionalQuestionType(ConsoleQuestionTypeIF q)
          Registers an additional questiontype (with the override flag, so it's no problem to register the same type again).
 void run()
           
 void shutdown()
           
 void shutdownWorldAdapters()
          Shuts down the agent's world adapters.
 void start()
           
 
Methods inherited from class org.micropsi.comp.common.AbstractComponent
getComponentDescriptor, getComponentID, getComponentRunner, getConsoleService, getExproc, getLogger, getRealLogger, initialize, overrideComponentID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentFrameworkComponent

public AgentFrameworkComponent()
Method Detail

getNextTicket

protected long getNextTicket()
Returns the next action ticket.

Returns:
the next free ticket for an action

performInitialisation

protected void performInitialisation()
                              throws MicropsiException
Initializes the agent framework. Reads config, initializes word adapters, creates the theAgent implementation object.

Specified by:
performInitialisation in class AbstractComponent
Throws:
MicropsiException

registerAdditionalQuestionType

public void registerAdditionalQuestionType(ConsoleQuestionTypeIF q)
Registers an additional questiontype (with the override flag, so it's no problem to register the same type again). This is mainly meant to be used by world adapters that want to provide their own question types.

Parameters:
q - the new question type to be registered

initializeWorldAdapters

public void initializeWorldAdapters()
                             throws MicropsiException
Loads and initializes the world adapters, creating action and percept descriptors.

Throws:
MicropsiException

shutdownWorldAdapters

public void shutdownWorldAdapters()
Shuts down the agent's world adapters. The component will be in a clean state after this method has been called and can be initialized as if it hat just been created.


start

public void start()
Specified by:
start in interface ActiveComponentIF

run

public void run()
Specified by:
run in interface ActiveComponentIF

getInnerType

public int getInnerType()
Specified by:
getInnerType in class AbstractComponent

getAgentThread

public java.lang.Thread getAgentThread()
Returns the Agent thread

Returns:

shutdown

public void shutdown()
Specified by:
shutdown in class AbstractComponent

(c) by Micropsi Project: http://www.cognitive-agents.org

.