|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkaos.core.util.MethodCallRequestHandler
kaos.robots.core.ExecutionManager
public abstract class ExecutionManager
Nested Class Summary | |
---|---|
class |
ExecutionManager.RequestHandlerThread
|
Field Summary | |
---|---|
protected java.lang.String |
_actorID
|
protected KAoSAgentDescription |
_agentDescription
|
protected java.util.Vector |
_classificationListeners
|
protected boolean |
_connected
|
java.util.Vector |
_currentActions
|
protected java.util.HashMap |
_enablingClasses
|
protected RobotEnforcer |
_enforcer
|
protected java.lang.String |
_ihmcDomain
|
protected boolean |
_kaosEnabled
|
protected java.util.HashMap |
_learnedTasks
|
protected java.util.HashMap |
_learnedTaskVariables
|
protected boolean |
_learning
|
protected java.util.HashMap |
_listeners
|
protected Logger |
_logger
|
protected java.lang.String |
_nickName
|
protected PolicyAdvice |
_policyAdvice
|
protected PolicyChecking |
_policyService
|
protected QueryRegistration |
_query
|
protected boolean |
_registeredWithKAoS
|
protected Registration |
_registration
|
ActionStatusCallback |
_reniaCallback
|
boolean |
_spatialReasoning
|
protected java.util.Vector |
_subtasks
|
protected java.lang.String |
_taskName
|
protected java.lang.String |
_transportName
|
protected java.lang.String |
myTeam
|
Fields inherited from class kaos.core.util.MethodCallRequestHandler |
---|
_helper, _mts, DEFAULT_NICKNAME, myLocator, myMessageReceiver, myMessageSender |
Constructor Summary | |
---|---|
ExecutionManager()
|
Method Summary | |
---|---|
void |
AssignLeader(java.util.HashMap properties)
|
ActionInstanceDescription |
buildAID(java.lang.String action,
java.util.HashMap properties)
buildAID Utility for turning string-hashmaps into ActionInstanceDeescriptions |
java.util.List<ActionInstanceDescription> |
checkObligations(ActionInstanceDescription aid)
|
void |
checkPermissionForAction(ActionInstanceDescription aid)
|
KAoSAgentDescription |
createMyOwnAgentDescription()
Creates a new AgentDescription for this KAoSRobot. |
void |
deregisterObserver(KAoSObserver observer,
java.lang.String updateType,
java.io.Serializable updateCondition,
KAoSEntityDescription observableDesc)
Deregister the given KAoSObserver from the registry of observers asoociated with the KAoSObservable, whose KAoSEntityDescription is given. |
void |
deregisterObserver(KAoSObserver observer,
java.lang.String updateType,
java.io.Serializable updateCondition,
java.lang.String observableGUID)
Deregister the given KAoSObserver from the registry of observers associated with the KAoSObservable, whose GUID is given. |
void |
deregisterObserver(java.lang.String updateType,
java.lang.Object updateCondition,
KAoSObserver observer)
Deregister the given KAoSObserver for the given update type from the registry of observers associated with this KAoSObservable. |
java.lang.Object |
executeLearnedAction(ActionInstanceDescription aid)
|
protected java.util.Vector |
getActions()
getActions retrieves all implemented interfaces. |
java.lang.String |
getActorID()
|
java.util.Vector |
getAdjustedMoveToActions(ActionInstanceDescription aid)
|
java.util.List<AgentCapability> |
getAgentCapabilities()
|
KAoSAgentDescription |
getAgentDescription()
|
static Coordinate |
getCoordinateFromPointInstance(OntInstanceDescriptionImpl point)
|
java.util.List |
GetLeadersOfTeam(java.util.HashMap properties)
|
java.util.HashMap |
getPropertiesFromAID(ActionInstanceDescription aid)
|
protected Area |
getRestrictedAreas(ActionInstanceDescription aid)
|
java.util.List |
GetTeamMembers(java.util.HashMap properties)
|
protected java.util.List |
getTeamMembers(java.lang.String teamName)
|
void |
init(java.lang.String[] args)
|
boolean |
isRegisteredWithKAoS()
|
protected boolean |
isWithinRestrictedArea(ActionInstanceDescription aid,
Area area)
|
void |
JoinTeam(java.util.HashMap properties)
|
void |
LeaveTeam(java.util.HashMap properties)
|
java.util.Vector |
makeActionAllowable(ActionInstanceDescription aid)
|
void |
modifySpatialProperties(Location3D location,
Orientation3D orientation,
Block3D block)
|
void |
notify(java.lang.String updateType,
java.lang.Object updateCondition,
java.lang.Object update)
Notify observers interested in the given updateType wiht the given update object. |
protected void |
printDebugString(java.lang.String msg,
int loggerDisplayLevel)
|
java.lang.Object |
processAIDRequest(ActionInstanceDescription actionDescription)
|
java.lang.Object |
processHashMapRequest(java.lang.String actionName)
This method accepts a request described by the given String containing action name. |
void |
processHashMapRequest(java.lang.String actionName,
ActionStatusCallback statusCallback)
This method accepts a request described by the given String containing the action name. |
java.lang.Object |
processHashMapRequest(java.lang.String actionName,
java.util.HashMap properties)
This method accepts a request described by the given String and HashMap of properties. |
void |
processHashMapRequest(java.lang.String actionName,
java.util.HashMap properties,
ActionStatusCallback statusCallback)
This method accepts a request described by the given String and HashMap of properties. |
java.lang.Object |
processOWLRequest(java.lang.String owlActionDescription)
This method accepts a request described by an OWL String to perform an action. |
void |
processOWLRequest(java.lang.String owlActionDescription,
ActionStatusCallback statusCallback)
This method accepts a request described by an OWL String to perform an action. |
void |
registerObserver(KAoSObserver observer,
java.lang.String updateType,
java.io.Serializable updateCondition,
KAoSEntityDescription observableDesc)
Register the given KAoSObserver with the KAoSObservable, whose KAoSEntityDescription is given, for updates described by the updateType and updateConstraints. |
void |
registerObserver(KAoSObserver observer,
java.lang.String updateType,
java.io.Serializable updateCondition,
java.lang.String observableGUID)
Register the given KAoSObserver with the KAoSObservable, whose GUID is given for updates described by the updateType and updateConditions. |
void |
registerObserver(KAoSObserver observer,
java.lang.String updateType,
java.io.Serializable updateCondition,
java.lang.String observableGUID,
java.lang.String brokerGUID)
Register the given KAoSObserver with the KAoSObservable, whose GUID is given for updates described by the updateType and updateConditions. |
void |
registerObserver(java.lang.String updateType,
java.lang.Object updateCondition,
KAoSObserver observer)
Register the given KAoSObserver with this KAoSObservable for updates described by the updateType and updateConstraints. |
void |
registerWithKAoS(java.lang.String teamName)
|
void |
registerWithSpatialProperties(Location3D location,
Orientation3D orientation,
Block3D block)
|
KAoSAgentDescription |
searchForAgentDescription(java.lang.String agentName)
|
protected void |
setRegisteredWithKAoS(boolean registered)
|
void |
shutdown()
|
void |
startLearning(java.util.HashMap properties)
|
void |
stopLearning()
|
void |
UnassignLeader(java.util.HashMap properties)
|
Methods inherited from class kaos.core.util.MethodCallRequestHandler |
---|
bindToTransport, handleMsgContent, handleObjContent, initialize, receiveMessage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface kaos.core.csi.observe.ObserverManager |
---|
registerKAoSExtensionComponentObserver |
Field Detail |
---|
protected Logger _logger
protected java.lang.String _actorID
protected java.lang.String _nickName
protected KAoSAgentDescription _agentDescription
protected java.util.Vector _classificationListeners
protected java.lang.String _ihmcDomain
protected boolean _kaosEnabled
protected RobotEnforcer _enforcer
protected boolean _registeredWithKAoS
protected boolean _connected
protected java.util.HashMap _enablingClasses
public java.util.Vector _currentActions
protected java.util.HashMap _listeners
public ActionStatusCallback _reniaCallback
public boolean _spatialReasoning
protected java.lang.String _transportName
protected Registration _registration
protected QueryRegistration _query
protected boolean _learning
protected java.util.Vector _subtasks
protected java.lang.String _taskName
protected java.util.HashMap _learnedTasks
protected java.util.HashMap _learnedTaskVariables
protected PolicyChecking _policyService
protected PolicyAdvice _policyAdvice
protected java.lang.String myTeam
Constructor Detail |
---|
public ExecutionManager()
Method Detail |
---|
public void init(java.lang.String[] args)
public void processHashMapRequest(java.lang.String actionName, java.util.HashMap properties, ActionStatusCallback statusCallback) throws ActionFailureException
processHashMapRequest
in interface HashMapRequestReceiver
actionName
- is a String representing the name of the action as defined in the associated ontology.properties
- is an HashMap of ontological Strings representing the desired properties of the action and the associated values.statusCallback
- ActionStatusCallback to be called to pass back to the action requestor information about progression of the action execution and the final result.
ActionFailureException
- containing the reason for failure. See ontology to determine specific reasons available for a given actionpublic void processHashMapRequest(java.lang.String actionName, ActionStatusCallback statusCallback) throws ActionFailureException
processHashMapRequest
in interface HashMapRequestReceiver
actionName
- is a String representing the name of the action as defined in the associated ontology.statusCallback
- ActionStatusCallback to be called to pass back to the action requestor information about progression of the action execution and the final result.
ActionFailureException
- containing the reason for failure. See ontology to determine specific reasons available for a given actionpublic java.lang.Object processHashMapRequest(java.lang.String actionName, java.util.HashMap properties) throws ActionFailureException
processHashMapRequest
in interface HashMapRequestReceiver
actionName
- is a String representing the name of the action as defined in the associated ontology.properties
- is an HashMap of ontological Strings representing the desired properties of the action and the associated values.
ActionFailureException
- containing the reason for failure. See ontology to determine specific reasons available for a given actionpublic java.lang.Object processHashMapRequest(java.lang.String actionName) throws ActionFailureException
processHashMapRequest
in interface HashMapRequestReceiver
actionName
- is a String representing the name of the action as defined in the associated ontology.
ActionFailureException
- containing the reason for failure. See ontology to determine specific reasons available for a given actionpublic void processOWLRequest(java.lang.String owlActionDescription, ActionStatusCallback statusCallback) throws ActionFailureException
OWLRequestReceiver
processOWLRequest
in interface OWLRequestReceiver
owlActionDescription
- is an OWL String that describes the action.
It includes the action name and all action properties and their values.statusCallback
- ActionStatusCallback to be called to pass back to the
action requestor information about progression of the action execution
and the final result.
ActionFailureException
- containing the reason for failure.
See ontology to determine specific reasons available for
a given actionpublic java.lang.Object processOWLRequest(java.lang.String owlActionDescription) throws ActionFailureException
OWLRequestReceiver
processOWLRequest
in interface OWLRequestReceiver
owlActionDescription
- is an OWL String that describes the action.
It includes the action name and all action properties and their values.
ActionFailureException
- containing the reason for failure.
See ontology to determine specific reasons available for
a given actionpublic java.lang.Object processAIDRequest(ActionInstanceDescription actionDescription) throws ActionFailureException
ActionFailureException
public void registerObserver(KAoSObserver observer, java.lang.String updateType, java.io.Serializable updateCondition, java.lang.String observableGUID) throws NotLocatableException, TransportFailure
ObserverManager
registerObserver
in interface ObserverManager
observer
- KAoSObserver requesting registration for updates.updateType
- String indicating type of update the KAoSObserver is interested in.updateCondition
- Serializable describing the conditions under which to send the update.observableGUID
- String containing the GUID of the KAoSObservable to register with.
NotLocatableException
- when the KAoSObservable cannot be located.
TransportFailure
- when transport services fails.public void registerObserver(KAoSObserver observer, java.lang.String updateType, java.io.Serializable updateCondition, KAoSEntityDescription observableDesc) throws NotLocatableException, TransportFailure
ObserverManager
registerObserver
in interface ObserverManager
observer
- KAoSObserver registering with for updates.updateType
- String indicating type of update the KAoSObserver is interested in.updateCondition
- Object describing the conditions under which to send the update.observableDesc
- KAoSEntityDescription describing the observable.
NotLocatableException
- when the KAoSObservable cannot be located.
TransportFailure
- when transport services fail.public void registerObserver(KAoSObserver observer, java.lang.String updateType, java.io.Serializable updateCondition, java.lang.String observableGUID, java.lang.String brokerGUID) throws NotLocatableException, TransportFailure
ObserverManager
registerObserver
in interface ObserverManager
observer
- KAoSObserver requesting registration for updates.updateType
- String indicating type of update the KAoSObserver is interested in.updateCondition
- Serializable describing the conditions under which to send the update.observableGUID
- String containing the GUID of the KAoSObservable to register with.brokerGUID
- String containing the GUID of the broker, through which to reach the observable.
NotLocatableException
- when the KAoSObservable or broker cannot be located.
TransportFailure
- when transport services fail.
the rgistration will be processed.public void deregisterObserver(KAoSObserver observer, java.lang.String updateType, java.io.Serializable updateCondition, java.lang.String observableGUID) throws NotLocatableException, TransportFailure
ObserverManager
deregisterObserver
in interface ObserverManager
observer
- KAoSObserver deregistering.updateType
- String indicating type of update the KAoSObserver is no longer interested in.updateCondition
- Serializable containing the condition the KAoSObserver is no longer interested in.observableGUID
- String specifying the GUID of the observable, from which to deregister
for the given update type.
NotLocatableException
- when the KAoSObservable cannot be located.
TransportFailure
- when transport services fail.public void deregisterObserver(KAoSObserver observer, java.lang.String updateType, java.io.Serializable updateCondition, KAoSEntityDescription observableDesc) throws NotLocatableException, TransportFailure
ObserverManager
deregisterObserver
in interface ObserverManager
observer
- KAoSObserver deregistering.updateType
- String indicating type of update the KAoSObserver is no longer interested in.updateCondition
- Serializable containing the condition the KAoSObserver is no longer interested in.observableDesc
- KAoSEntityDescription of the observable, from which to deregister
for the given update type.
NotLocatableException
- when the KAoSObservable cannot be located.
TransportFailure
- when transport services fail.public void registerObserver(java.lang.String updateType, java.lang.Object updateCondition, KAoSObserver observer)
registerObserver
in interface KAoSObservable
updateType
- String indicating type of update the KAoSObserver is interested in.updateCondition
- Object describing the conditions under which to send the update.observer
- KAoSObserver registering with for updates.public void deregisterObserver(java.lang.String updateType, java.lang.Object updateCondition, KAoSObserver observer)
deregisterObserver
in interface KAoSObservable
updateType
- String indicating type of update the KAoSObserver is no longer interested in.observer
- KAoSObserver deregistering.public void notify(java.lang.String updateType, java.lang.Object updateCondition, java.lang.Object update)
notify
in interface KAoSObservable
updateType
- String describing the type of update to perform.update
- Object containing the update.public ActionInstanceDescription buildAID(java.lang.String action, java.util.HashMap properties)
action
- Action nameproperties
- Hashmap of property name-value pairs
public void startLearning(java.util.HashMap properties)
public void stopLearning()
public java.util.Vector makeActionAllowable(ActionInstanceDescription aid) throws java.lang.Exception
java.lang.Exception
protected Area getRestrictedAreas(ActionInstanceDescription aid)
protected boolean isWithinRestrictedArea(ActionInstanceDescription aid, Area area)
public java.util.Vector getAdjustedMoveToActions(ActionInstanceDescription aid)
public static Coordinate getCoordinateFromPointInstance(OntInstanceDescriptionImpl point) throws ValueNotSet
ValueNotSet
public java.util.List<ActionInstanceDescription> checkObligations(ActionInstanceDescription aid) throws java.lang.Exception
java.lang.Exception
public KAoSAgentDescription getAgentDescription()
public KAoSAgentDescription createMyOwnAgentDescription()
public java.util.List<AgentCapability> getAgentCapabilities()
public boolean isRegisteredWithKAoS()
protected void setRegisteredWithKAoS(boolean registered)
public void registerWithKAoS(java.lang.String teamName)
public KAoSAgentDescription searchForAgentDescription(java.lang.String agentName)
protected java.util.Vector getActions()
public java.util.HashMap getPropertiesFromAID(ActionInstanceDescription aid)
public java.lang.Object executeLearnedAction(ActionInstanceDescription aid) throws java.lang.Exception
java.lang.Exception
public java.lang.String getActorID()
public void registerWithSpatialProperties(Location3D location, Orientation3D orientation, Block3D block)
public void modifySpatialProperties(Location3D location, Orientation3D orientation, Block3D block)
public void checkPermissionForAction(ActionInstanceDescription aid) throws ActionFailureException
ActionFailureException
public void JoinTeam(java.util.HashMap properties) throws DirectoryFailure, QueryFailure
DirectoryFailure
QueryFailure
public void LeaveTeam(java.util.HashMap properties) throws DirectoryFailure, QueryFailure, NotRegisteredException
DirectoryFailure
QueryFailure
NotRegisteredException
public java.util.List GetTeamMembers(java.util.HashMap properties) throws DirectoryFailure, QueryFailure
DirectoryFailure
QueryFailure
protected java.util.List getTeamMembers(java.lang.String teamName) throws DirectoryFailure, QueryFailure
DirectoryFailure
QueryFailure
public void AssignLeader(java.util.HashMap properties) throws NotRegisteredException, DirectoryFailure, ModificationException
NotRegisteredException
DirectoryFailure
ModificationException
public void UnassignLeader(java.util.HashMap properties) throws NotRegisteredException, DirectoryFailure, ModificationException
NotRegisteredException
DirectoryFailure
ModificationException
public java.util.List GetLeadersOfTeam(java.util.HashMap properties) throws QueryFailure, DirectoryFailure
QueryFailure
DirectoryFailure
protected void printDebugString(java.lang.String msg, int loggerDisplayLevel)
public void shutdown()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |