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, setResultValue
addService, 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, waitForDelay
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, boolean realtime, IIntermediateResultListener<Tuple2<String,Object>> resultlistener, Future<Void> inited)
adapter
- The adapter.microagent
- The microagent.public void startBehavior()
startBehavior
in interface IComponentInstance
startBehavior
in class jadex.kernelbase.StatelessAbstractInterpreter
public IValueFetcher getFetcher()
getFetcher
in class jadex.kernelbase.AbstractInterpreter
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 void streamArrived(IConnection con)
streamArrived
in interface IComponentInstance
streamArrived
in class jadex.kernelbase.StatelessAbstractInterpreter
con
- The stream that arrived.public IFuture<Void> startEndSteps()
startEndSteps
in class jadex.kernelbase.StatelessAbstractInterpreter
public IFuture<Void> terminateServiceContainer()
terminateServiceContainer
in class jadex.kernelbase.StatelessAbstractInterpreter
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)
public ClassLoader getClassLoader()
getClassLoader
in interface IComponentInstance
getClassLoader
in class jadex.kernelbase.StatelessAbstractInterpreter
Copyright © 2012. All Rights Reserved.