public class MicroAgentInterpreter
extends jadex.kernelbase.AbstractInterpreter
| Modifier and Type | Class and Description |
|---|---|
static class |
MicroAgentInterpreter.HandleMessageStep
Step to handle a message.
|
static class |
MicroAgentInterpreter.StepInfo
Info struct for steps.
|
| 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<String,Object> args,
String config,
IExternalAccess parent,
RequiredServiceBinding[] bindings,
ProvidedServiceInfo[] pinfos,
boolean copy,
boolean realtime,
boolean persist,
IPersistInfo persistinfo,
IIntermediateResultListener<Tuple2<String,Object>> resultlistener,
Future<Void> inited,
LocalServiceRegistry registry)
Create a new agent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMessageHandler(IMessageHandler handler)
Add a message handler.
|
void |
afterBlock()
Called after unblocking the component thread.
|
void |
beforeBlock()
Called before blocking the component thread.
|
IExternalAccess |
createExternalAccess()
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.
|
MicroAgent |
getAgent()
Get the agent.
|
IComponentAdapter |
getAgentAdapter()
Get the agent adapter.
|
ClassLoader |
getClassLoader()
Get the class loader of the component.
|
IValueFetcher |
getFetcher()
Get the value fetcher.
|
IInternalAccess |
getInternalAccess()
Get the internal access.
|
MicroModel |
getMicroModel()
Get the micro model.
|
jadex.kernelbase.DefaultPersistInfo |
getPersistableState()
Get the persistable state.
|
Object |
getPojoAgent()
Get the pojo agent (or null if it has none).
|
Object |
getStepDetails(IComponentStep step)
Get the details of a step.
|
IFuture<Void> |
initComponents(IModelInfo model,
String config)
Add extra init code after components.
|
IFuture<Void> |
initProvidedServices(IModelInfo model,
String config)
Add extra init code before provided services.
|
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.
|
<T> IFuture<T> |
scheduleStep(IComponentStep<T> step,
long delay)
Schedule a step of the component.
|
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, addDefaultResult, addExtension, addProperty, checkAllowedThread, getArguments, getBindings, getComponentAdapter, getConfiguration, getExtension, getExtensions, getExternalAccess, getModel, getMonitoringServiceGetter, getParentAccess, getProperties, getProvidedServiceInfos, getPublishEmitLevelMonitoring, getPublishEmitLevelSubscriptions, getResults, getServiceContainer, getServiceRegistry, hasEventTargets, invalidateAccess, isCopy, isRealtime, publishLocalEvent, setResultValue, subscribeToEvents, subscribeToResults, terminateResultSubscribersaddService, cleanupComponent, componentCreated, componentDestroyed, createChild, createComponent, createInternalService, createResultListener, createResultListener, getArguments, getChildren, getComponentDescription, getComponentFilename, getComponentIdentifier, getCurrentStateEvents, getLocalType, getLogger, getName, getName, getNumber, getParent, getProperty, getRawService, getRawService, getRawServices, getServicePrefix, getServiceProvider, init, initArguments, initExtension, initExtensions, initFutureProperties, initRequiredServices, isComponentThread, isExternalThread, killComponent, publishEvent, publishEvent, startInitialSteps, startServiceContainer, terminateExtensions, toString, waitForDelay, waitForDelay, waitForDelay, waitForDelayaddNFProperty, getNFAllPropertyNames, getNFPropertyMetaInfo, getNFPropertyMetaInfos, getNFPropertyNames, getNFPropertyValue, getNFPropertyValue, removeNFProperty, setParent, shutdownNFPropertyProviderpublic static final String TYPE_STEP
public MicroAgentInterpreter(IComponentDescription desc, IComponentAdapterFactory factory, MicroModel model, Class<?> microclass, Map<String,Object> args, String config, IExternalAccess parent, RequiredServiceBinding[] bindings, ProvidedServiceInfo[] pinfos, boolean copy, boolean realtime, boolean persist, IPersistInfo persistinfo, IIntermediateResultListener<Tuple2<String,Object>> resultlistener, Future<Void> inited, LocalServiceRegistry registry)
adapter - The adapter.microagent - The microagent.public IFuture<Void> initProvidedServices(IModelInfo model, String config)
initProvidedServices in class jadex.kernelbase.StatelessAbstractInterpreterpublic IFuture<Void> initComponents(IModelInfo model, String config)
initComponents in class jadex.kernelbase.StatelessAbstractInterpreterpublic void startBehavior()
startBehavior in interface IComponentInstancestartBehavior in class jadex.kernelbase.StatelessAbstractInterpreterpublic void beforeBlock()
public void afterBlock()
public 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 <T> IFuture<T> scheduleStep(IComponentStep<T> step, long delay)
step - Code to be executed as a step of the component.delay - The delay to wait before step should be done.public IComponentAdapter getAgentAdapter()
public Object getPojoAgent()
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 createExternalAccess()
createExternalAccess 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.StatelessAbstractInterpreterpublic MicroModel getMicroModel()
public MicroAgent getAgent()
public jadex.kernelbase.DefaultPersistInfo getPersistableState()
getPersistableState in interface IComponentInstancegetPersistableState in class jadex.kernelbase.StatelessAbstractInterpreterCopyright © 2015. All Rights Reserved.