Package jadex.bdiv3x.runtime
Class RMessageEvent<T>
- java.lang.Object
-
- jadex.bdiv3.runtime.impl.RElement
-
- jadex.bdiv3.runtime.impl.RParameterElement
-
- jadex.bdiv3.runtime.impl.RProcessableElement
-
- jadex.bdiv3x.runtime.RMessageEvent<T>
-
- All Implemented Interfaces:
IElement
,IMessageEvent<T>
,IParameterElement
,IMapAccess
public class RMessageEvent<T> extends jadex.bdiv3.runtime.impl.RProcessableElement implements IMessageEvent<T>
The runtime message event.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
RMessageEvent.RParam
class
RMessageEvent.RParamSet
-
Constructor Summary
Constructors Constructor Description RMessageEvent(MMessageEvent modelelement, IInternalAccess agent, MConfigParameterElement config)
Create a new runtime element.RMessageEvent(MMessageEvent modelelement, T msg, IInternalAccess agent, RMessageEvent<T> original)
Create a new runtime element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IParameter
createParameter(MParameter modelelement, java.lang.String name, IInternalAccess agent, UnparsedExpression inival)
IParameter
createParameter(MParameter modelelement, java.lang.String name, IInternalAccess agent, java.lang.Object value)
IParameterSet
createParameterSet(MParameter modelelement, java.lang.String name, IInternalAccess agent, java.lang.Object values)
IParameterSet
createParameterSet(MParameter modelelement, java.lang.String name, IInternalAccess agent, java.util.List<UnparsedExpression> inivals)
protected BeanProperty
findBeanProperty(java.lang.String name)
java.lang.String
getFetcherName()
Get the name of the element in the fetcher (e.g.T
getMessage()
Get the native (platform specific) message object.MMessageEvent
getMMessageEvent()
RMessageEvent<T>
getOriginal()
Get the original message event (if this is a reply).IParameter
getParameter(java.lang.String name)
Get the parameter element.IParameterSet
getParameterSet(java.lang.String name)
Get the parameter set element.boolean
hasParameter(java.lang.String name)
Has the element a parameter element.boolean
hasParameterSet(java.lang.String name)
Has the element a parameter set element.void
initParameters(java.util.Map<java.lang.String,java.lang.Object> vals, MConfigParameterElement config)
Create the parameters from model spec.boolean
isAdopted()
Check if the element is currently part of the agent's reasoning.java.lang.String
toString()
Get the string represntation.-
Methods inherited from class jadex.bdiv3.runtime.impl.RProcessableElement
addTriedPlan, getApplicablePlanList, getPojoElement, getState, getTriedPlans, planFinished, setApplicablePlanList, setPojoElement, setState, setState, setTriedPlans, testWriteOK
-
Methods inherited from class jadex.bdiv3.runtime.impl.RParameterElement
addParameter, addParameterSet, get, getParameters, getParameterSets, getType, wrapFetcher
-
Methods inherited from class jadex.bdiv3.runtime.impl.RElement
getAgent, getCapability, getId, getMCapability, getModelElement, getRuleSystem, setId, setModelElement
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jadex.bdiv3x.runtime.IElement
getModelElement
-
Methods inherited from interface jadex.bdiv3x.runtime.IParameterElement
getParameters, getParameterSets, getType
-
-
-
-
Field Detail
-
msg
protected T msg
The message.
-
-
Constructor Detail
-
RMessageEvent
public RMessageEvent(MMessageEvent modelelement, IInternalAccess agent, MConfigParameterElement config)
Create a new runtime element.
-
RMessageEvent
public RMessageEvent(MMessageEvent modelelement, T msg, IInternalAccess agent, RMessageEvent<T> original)
Create a new runtime element. Constructor Without parameter init for received messages.
-
-
Method Detail
-
initParameters
public void initParameters(java.util.Map<java.lang.String,java.lang.Object> vals, MConfigParameterElement config)
Create the parameters from model spec.- Overrides:
initParameters
in classjadex.bdiv3.runtime.impl.RParameterElement
-
getFetcherName
public java.lang.String getFetcherName()
Get the name of the element in the fetcher (e.g. $goal).- Specified by:
getFetcherName
in classjadex.bdiv3.runtime.impl.RParameterElement
- Returns:
- The element name in the fetcher name.
-
createParameter
public IParameter createParameter(MParameter modelelement, java.lang.String name, IInternalAccess agent, UnparsedExpression inival)
- Overrides:
createParameter
in classjadex.bdiv3.runtime.impl.RParameterElement
-
createParameterSet
public IParameterSet createParameterSet(MParameter modelelement, java.lang.String name, IInternalAccess agent, java.util.List<UnparsedExpression> inivals)
- Overrides:
createParameterSet
in classjadex.bdiv3.runtime.impl.RParameterElement
-
createParameter
public IParameter createParameter(MParameter modelelement, java.lang.String name, IInternalAccess agent, java.lang.Object value)
- Overrides:
createParameter
in classjadex.bdiv3.runtime.impl.RParameterElement
-
createParameterSet
public IParameterSet createParameterSet(MParameter modelelement, java.lang.String name, IInternalAccess agent, java.lang.Object values)
- Overrides:
createParameterSet
in classjadex.bdiv3.runtime.impl.RParameterElement
-
hasParameter
public boolean hasParameter(java.lang.String name)
Has the element a parameter element.- Specified by:
hasParameter
in interfaceIParameterElement
- Overrides:
hasParameter
in classjadex.bdiv3.runtime.impl.RParameterElement
- Parameters:
name
- The name.- Returns:
- True, if it has the parameter.
-
hasParameterSet
public boolean hasParameterSet(java.lang.String name)
Has the element a parameter set element.- Specified by:
hasParameterSet
in interfaceIParameterElement
- Overrides:
hasParameterSet
in classjadex.bdiv3.runtime.impl.RParameterElement
- Parameters:
name
- The name.- Returns:
- True, if it has the parameter set.
-
getParameter
public IParameter getParameter(java.lang.String name)
Get the parameter element.- Specified by:
getParameter
in interfaceIParameterElement
- Overrides:
getParameter
in classjadex.bdiv3.runtime.impl.RParameterElement
- Parameters:
name
- The name.- Returns:
- The param.
-
getParameterSet
public IParameterSet getParameterSet(java.lang.String name)
Get the parameter set element.- Specified by:
getParameterSet
in interfaceIParameterElement
- Overrides:
getParameterSet
in classjadex.bdiv3.runtime.impl.RParameterElement
- Parameters:
name
- The name.- Returns:
- The param set.
-
getMessage
public T getMessage()
Get the native (platform specific) message object.- Specified by:
getMessage
in interfaceIMessageEvent<T>
- Returns:
- The native message.
-
getOriginal
public RMessageEvent<T> getOriginal()
Get the original message event (if this is a reply).
-
getMMessageEvent
public MMessageEvent getMMessageEvent()
-
toString
public java.lang.String toString()
Get the string represntation.- Overrides:
toString
in classjadex.bdiv3.runtime.impl.RElement
-
findBeanProperty
protected BeanProperty findBeanProperty(java.lang.String name)
-
isAdopted
public boolean isAdopted()
Check if the element is currently part of the agent's reasoning. E.g. the bases are always adopted and all of their contents such as goals, plans and beliefs.- Specified by:
isAdopted
in classjadex.bdiv3.runtime.impl.RParameterElement
-
-