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,
boolean realtime,
IIntermediateResultListener<Tuple2<String,Object>> resultlistener,
Future<Void> inited)
Create a new agent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMessageHandler(IMessageHandler handler)
Add a message handler.
|
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.
|
ClassLoader |
getClassLoader()
Get the class loader of the component.
|
IExternalAccess |
getExternalAccess()
Can be called concurrently (also during executeAction()).
|
IValueFetcher |
getFetcher()
Get the value fetcher.
|
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.
|
IFuture<Void> |
startEndSteps()
Start the end steps of the component.
|
void |
streamArrived(IConnection con)
Can be called concurrently (also during executeAction()).
|
IFuture<Void> |
terminateServiceContainer()
Called from cleanupComponent.
|
addArgument, addComponentListener, addDefaultResult, addExtension, addProperty, getArguments, getBindings, getComponentAdapter, getComponentListeners, getConfiguration, getExtension, getExtensions, getInternalComponentListeners, getModel, getParentAccess, getProperties, getResults, getServiceBindings, getServiceContainer, isCopy, isRealtime, removeComponentListener, setResultValueaddService, cleanupComponent, componentCreated, componentDestroyed, createComponent, createResultListener, createResultListener, getArguments, getChildren, getChildrenAccesses, getChildrenIdentifiers, getComponentDescription, getComponentFilename, getComponentIdentifier, getLocalType, getLogger, getName, getName, getNumber, getProperty, getRawService, getRawService, getRawServices, getServicePrefix, getServiceProvider, init, initArguments, initComponents, initExtension, initExtensions, initFutureProperties, initServices, isComponentThread, isExternalThread, killComponent, notifyListeners, startInitialSteps, startServiceContainer, terminateExtensions, toString, waitForDelaypublic 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, boolean realtime, IIntermediateResultListener<Tuple2<String,Object>> resultlistener, Future<Void> inited)
adapter - The adapter.microagent - The microagent.public void startBehavior()
startBehavior in interface IComponentInstancestartBehavior in class jadex.kernelbase.StatelessAbstractInterpreterpublic IValueFetcher getFetcher()
getFetcher in class jadex.kernelbase.AbstractInterpreterpublic boolean executeStep()
executeStep in interface IComponentInstanceexecuteStep in class jadex.kernelbase.StatelessAbstractInterpreterpublic void messageArrived(IMessageAdapter message)
messageArrived in interface IComponentInstancemessageArrived in class jadex.kernelbase.StatelessAbstractInterpretermessage - The message that arrived.public void streamArrived(IConnection con)
streamArrived in interface IComponentInstancestreamArrived in class jadex.kernelbase.StatelessAbstractInterpretercon - The stream that arrived.public IFuture<Void> startEndSteps()
startEndSteps in class jadex.kernelbase.StatelessAbstractInterpreterpublic IFuture<Void> terminateServiceContainer()
terminateServiceContainer in class jadex.kernelbase.StatelessAbstractInterpreterpublic boolean isAtBreakpoint(String[] breakpoints)
isAtBreakpoint in interface IComponentInstanceisAtBreakpoint in class jadex.kernelbase.StatelessAbstractInterpreterbreakpoints - An array of breakpoints.public <T> IFuture<T> scheduleStep(IComponentStep<T> step)
scheduleStep in class jadex.kernelbase.StatelessAbstractInterpreterstep - 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.StatelessAbstractInterpreterpublic IExternalAccess getExternalAccess()
getExternalAccess in interface IComponentInstancegetExternalAccess in class jadex.kernelbase.AbstractInterpreterlistener - External access is delivered via result listener.public IServiceContainer createServiceContainer()
createServiceContainer in class jadex.kernelbase.AbstractInterpreterpublic IServiceContainer createMyServiceContainer(Map args)
public Object getStepDetails(IComponentStep step)
public ClassLoader getClassLoader()
getClassLoader in interface IComponentInstancegetClassLoader in class jadex.kernelbase.StatelessAbstractInterpreterCopyright © 2012. All Rights Reserved.