brahms.communication
Class GetCommunicativeActProperty
java.lang.Object
gov.nasa.arc.brahms.vm.api.jac.AbstractExternalActivity
brahms.communication.GetCommunicativeActProperty
- All Implemented Interfaces:
- IExternalActivity
- Direct Known Subclasses:
- GetEnvelopePropertyActivity, GetPayloadPropertyActivity
public abstract class GetCommunicativeActProperty
- extends AbstractExternalActivity
The GetCommunicativeActProperty activity allows a model builder to retrieve
the value of a property in the belief set of a communicative act by passing
an unbound variable and having it be assigned the value of the property in
the envelope map or payload map of the communicative act.
This activity requires three parameters in the Brahms java activity
declaration:
- CommunicativeAct communicativeAct (the communicative act from which to retrieve a property value)
- string key (the key for the property)
- an unbound variable
This activity will throw an ExternalException if:
- the value parameter is not an unbound variable.
- the type of the value keyed to the given key in the communicative acts belief set does not match the variable parameter type
- the communicative act has no belief in its property map for the given key.
- Version:
- $Revision: 1.2 $ $Date: 2008/08/17 15:32:29 $ $Author: rvhoof $
- Author:
- Mike Scott
|
Field Summary |
static org.apache.log4j.Logger |
LOGGER
|
|
Method Summary |
void |
doActivity()
Executes the java activity action. |
abstract CommunicativeAct.MAP |
getMap()
Returns the CommunicativeAct.MAP constant indicating to which map
the property being set belongs. |
| Methods inherited from class gov.nasa.arc.brahms.vm.api.jac.AbstractExternalActivity |
assertBelief, assertFact, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, getContext, getModel, getName, getParameter, getParameterCount, getPerformedBy, getVMController, getWorldState, isValidTruthValue, retractBelief, retractFact, send, send, send, send, setActivity, setProperties, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LOGGER
public static final org.apache.log4j.Logger LOGGER
GetCommunicativeActProperty
public GetCommunicativeActProperty()
doActivity
public void doActivity()
throws ExternalException
- Executes the java activity action.
- Specified by:
doActivity in interface IExternalActivity- Specified by:
doActivity in class AbstractExternalActivity
- Throws:
ExternalException - if an unrecoverable error occurs.
getMap
public abstract CommunicativeAct.MAP getMap()
- Returns the CommunicativeAct.MAP constant indicating to which map
the property being set belongs.
- Returns:
- one of MAP.ENVELOPE or MAP.PAYLOAD
Copyright © 1997-2008 NASA. All Rights Reserved.