public class MicroAgentInterpreter
extends jadex.kernelbase.AbstractInterpreter
Modifier and Type | Class and Description |
---|---|
static class |
MicroAgentInterpreter.HandleMessageStep
Step to handle a message.
|
Modifier and Type | Field and Description |
---|---|
static String |
TYPE_STEP
Constant for step event.
|
Constructor and Description |
---|
MicroAgentInterpreter(IComponentDescription desc,
IComponentAdapterFactory factory,
MicroModel model,
Class microclass,
Map args,
String config,
IExternalAccess parent,
RequiredServiceBinding[] bindings,
boolean copy,
Future<Tuple2<IComponentInstance,IComponentAdapter>> inited)
Create a new agent.
|
Modifier and Type | Method and Description |
---|---|
void |
addMessageHandler(IMessageHandler handler)
Add a message handler.
|
IFuture |
cleanupComponent()
Can be called concurrently (also during executeAction()).
|
IServiceContainer |
createMyServiceContainer(Map args)
Create the service container.
|
IServiceContainer |
createServiceContainer()
Create the service container.
|
boolean |
executeStep()
Can be called on the agent thread only.
|
IComponentAdapter |
getAgentAdapter()
Get the agent adapter.
|
IExternalAccess |
getExternalAccess()
Can be called concurrently (also during executeAction()).
|
IInternalAccess |
getInternalAccess()
Get the internal access.
|
Object |
getStepDetails(IComponentStep step)
Get the details of a step.
|
boolean |
isAtBreakpoint(String[] breakpoints)
Test if the component's execution is currently at one of the
given breakpoints.
|
void |
messageArrived(IMessageAdapter message)
Can be called concurrently (also during executeAction()).
|
void |
removeMessageHandler(IMessageHandler handler)
Remove a message handler.
|
<T> IFuture<T> |
scheduleStep(IComponentStep<T> step)
Schedule a step of the agent.
|
void |
startBehavior()
Start the component behavior.
|
addArgument, addComponentListener, addDefaultResult, addExtension, addProperty, getArguments, getBindings, getComponentAdapter, getComponentListeners, getConfiguration, getCreationTime, getExtension, getExtensions, getFetcher, getInternalComponentListeners, getModel, getParent, getProperties, getResults, getServiceBindings, getServiceContainer, isCopy, removeComponentListener, setResultValue
addService, componentCreated, componentDestroyed, createComponent, createResultListener, createResultListener, getArguments, getChildren, getChildren, getClassLoader, getComponentDescription, getComponentFilename, getComponentIdentifier, getLocalType, getLogger, getName, getName, getNumber, getProperty, getRawService, getRawService, getRawServices, getServicePrefix, getServiceProvider, init, initArguments, initComponents, initExtensions, initFutureProperties, initServices, killComponent, notifyListeners, startEndSteps, startInitialSteps, startServiceContainer, terminateExtensions, toString
public static final String TYPE_STEP
public MicroAgentInterpreter(IComponentDescription desc, IComponentAdapterFactory factory, MicroModel model, Class microclass, Map args, String config, IExternalAccess parent, RequiredServiceBinding[] bindings, boolean copy, Future<Tuple2<IComponentInstance,IComponentAdapter>> inited)
adapter
- The adapter.microagent
- The microagent.public void startBehavior()
startBehavior
in interface IComponentInstance
startBehavior
in class jadex.kernelbase.StatelessAbstractInterpreter
public boolean executeStep()
executeStep
in interface IComponentInstance
executeStep
in class jadex.kernelbase.StatelessAbstractInterpreter
public void messageArrived(IMessageAdapter message)
messageArrived
in interface IComponentInstance
messageArrived
in class jadex.kernelbase.StatelessAbstractInterpreter
message
- The message that arrived.public IFuture cleanupComponent()
cleanupComponent
in interface IComponentInstance
cleanupComponent
in class jadex.kernelbase.StatelessAbstractInterpreter
listener
- When cleanup of the agent is finished, the listener must be notified.public boolean isAtBreakpoint(String[] breakpoints)
isAtBreakpoint
in interface IComponentInstance
isAtBreakpoint
in class jadex.kernelbase.StatelessAbstractInterpreter
breakpoints
- An array of breakpoints.public <T> IFuture<T> scheduleStep(IComponentStep<T> step)
scheduleStep
in class jadex.kernelbase.StatelessAbstractInterpreter
step
- Code to be executed as a step of the agent.public IComponentAdapter getAgentAdapter()
public void addMessageHandler(IMessageHandler handler)
The
- handler.public void removeMessageHandler(IMessageHandler handler)
handler
- The handler.public IInternalAccess getInternalAccess()
getInternalAccess
in class jadex.kernelbase.StatelessAbstractInterpreter
public IExternalAccess getExternalAccess()
getExternalAccess
in interface IComponentInstance
getExternalAccess
in class jadex.kernelbase.AbstractInterpreter
listener
- External access is delivered via result listener.public IServiceContainer createServiceContainer()
createServiceContainer
in class jadex.kernelbase.AbstractInterpreter
public IServiceContainer createMyServiceContainer(Map args)
public Object getStepDetails(IComponentStep step)
Copyright © 2012. All Rights Reserved.