|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectkaos.core.service.boot.KAoSAgent
kaos.autonomy.Kaa
public class Kaa
| Field Summary |
|---|
| Fields inherited from class kaos.core.service.boot.KAoSAgent |
|---|
_agentDescription, _agentDirectoryService, _agentNamingService, _agentNickname, _lctr, _logger, _messageTransportService, _name, _serviceRoot |
| Constructor Summary | |
|---|---|
Kaa()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
addNamePrefix(java.lang.String name)
Add prefix: Amigo -> urn:kaos#Amigo |
protected TransportMessage |
buildTransportMessage(AgentDescription agt,
java.lang.Object content)
build transport message given content to be sent |
boolean |
checkStepByStepIDBuild()
|
boolean |
checkUserObservation()
|
java.lang.String |
checkUserStatus()
|
void |
controlAdjustableAutonomy(java.lang.String appealerName,
Locator appealerLocator,
java.lang.String failureType,
ActionInstanceDescription aid,
java.lang.String policyID,
java.lang.String policyType,
PolicyMsg policyMessage,
java.lang.String situation)
call Kaa decision making module |
void |
controlAdjustableAutonomyWithBackupPlans(java.lang.String agentID,
Locator appealerLocator,
java.lang.String failureType,
ActionInstanceDescription aid,
java.lang.String policyID,
java.lang.String policyType,
PolicyMsg policyMessage,
java.lang.String situation)
|
protected AgentDescription |
findAgent(java.lang.String agentName)
find agent description for a given agent ID |
KAoSAgentDirectoryServiceProxy |
getDirectoryServiceProxy()
get directory service proxy |
Locator |
getGuardLocator(java.lang.String actor)
get the locator of Guard |
java.lang.String |
getID()
Return the unique identifier of this observer. |
static void |
main(java.lang.String[] args)
main method |
void |
onAborted(java.util.Calendar time,
java.lang.Object reason,
java.lang.String actionID,
java.lang.String robotID)
This method is invoked when the requested action is aborted. |
void |
onAccepted(java.util.Calendar time,
java.lang.Object acceptInfo,
java.lang.String actionID,
java.lang.String robotID)
This method is invoked when the request is accepted by the robot. |
void |
onCompleted(java.util.Calendar time,
java.lang.Object result,
java.lang.String actionID,
java.lang.String robotID)
This method is invoked upon completion of the request byt the requested robot. |
void |
onRefused(java.util.Calendar time,
java.lang.Object reason,
java.lang.String actionID,
java.lang.String robotID)
This method is invoked when the request is refused by the robot. |
void |
onStarted(java.util.Calendar time,
java.lang.Object startedInfo,
java.lang.String actionID,
java.lang.String robotID)
This method is invoked when the robot starts the requested action. |
void |
receiveKAoSStatus(java.lang.String statusMsg,
java.lang.String actionID,
java.lang.String robotID)
Receive a status message describing the execution of the requested action. |
void |
receiveMessage(TransportMessage tmsg)
steps to take when receive message from agent |
void |
reinstateObligationPolicy(Locator guardLocator,
java.lang.String policyID)
tell a guard to reinstate an obligation policy |
protected void |
sendMessageToAgent(java.lang.String toWhom,
java.lang.Object content)
send given message content to an agent |
protected void |
sendMessageToClassifier(Locator appealerLocator,
java.lang.String receiverName,
java.lang.Object content)
send given message content to classifier |
protected void |
sendRequestToGuard(Locator guardLocator,
java.lang.String request,
java.util.Vector args)
send a request to the specified guard. |
java.lang.String |
stripNamePrefix(java.lang.String name)
Remove the name prefix: urn:kaos#Amigo -> Amigo |
java.lang.String |
stripOntologyURL(java.lang.String givenAction)
Remove ontology url prefix: http://....#ClassifyObject -> ClassifyObject |
void |
suspendObligationPolicy(Locator guardLocator,
java.lang.String policyID)
tell a guard to suspend an obligation policy |
void |
update(java.lang.String observableID,
java.lang.String updateType,
java.lang.Object updateCondition,
java.lang.Object update)
Receive an update from the KAoSObservable when the KAoSObservable has a change or event to report. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Kaa()
| Method Detail |
|---|
public void controlAdjustableAutonomy(java.lang.String appealerName,
Locator appealerLocator,
java.lang.String failureType,
ActionInstanceDescription aid,
java.lang.String policyID,
java.lang.String policyType,
PolicyMsg policyMessage,
java.lang.String situation)
aid - Action instance description
public void controlAdjustableAutonomyWithBackupPlans(java.lang.String agentID,
Locator appealerLocator,
java.lang.String failureType,
ActionInstanceDescription aid,
java.lang.String policyID,
java.lang.String policyType,
PolicyMsg policyMessage,
java.lang.String situation)
public void receiveMessage(TransportMessage tmsg)
receiveMessage in class KAoSAgenttmsg - Transport message
protected void sendMessageToClassifier(Locator appealerLocator,
java.lang.String receiverName,
java.lang.Object content)
content - Message to be sent
protected void sendMessageToAgent(java.lang.String toWhom,
java.lang.Object content)
toWhom - Agent to receive a messagecontent - Message to be sent
protected void sendRequestToGuard(Locator guardLocator,
java.lang.String request,
java.util.Vector args)
guardLocator - locator of the guard to whom to send the requestrequest - Specific request to be sentargs - Necessary arguments for that request.protected AgentDescription findAgent(java.lang.String agentName)
agentName - Actor name
protected TransportMessage buildTransportMessage(AgentDescription agt,
java.lang.Object content)
agt - Description of an agent which will receive a messagecontent - Content of message to be sent
public Locator getGuardLocator(java.lang.String actor)
throws DirectoryFailure
actor - A String specifying the name of agent
DirectoryFailure - If error in the D.S.
public void suspendObligationPolicy(Locator guardLocator,
java.lang.String policyID)
guardLocator - Locator of the guard to whom send the message topolicyID - ID of the policy that is to be suspended.
public void reinstateObligationPolicy(Locator guardLocator,
java.lang.String policyID)
guardLocator - Locator of the guard to whom send the message topolicyID - ID of the policy that is to be reinstated.public KAoSAgentDirectoryServiceProxy getDirectoryServiceProxy()
public void onAccepted(java.util.Calendar time,
java.lang.Object acceptInfo,
java.lang.String actionID,
java.lang.String robotID)
onAccepted in interface FeedbackReceivertime - Calendar time of acceptance.acceptInfo - Object containing additional (optional) info about the acceptance.actionID - String containing the id of the requested action/information.robotID - String containing the name of the robot performing the action.
public void onRefused(java.util.Calendar time,
java.lang.Object reason,
java.lang.String actionID,
java.lang.String robotID)
onRefused in interface FeedbackReceivertime - Calendar time of refusal.reason - Object containing the reason for refusing the request.actionID - String containing the id of the requested action/information.robotID - String containing the name of the robot performing the action.
public void onCompleted(java.util.Calendar time,
java.lang.Object result,
java.lang.String actionID,
java.lang.String robotID)
onCompleted in interface FeedbackReceivertime - Calendar time of information/action completion.result - Object containing the result of the requested action.actionID - String containing the id of the requested action/information.robotID - String containing the name of the robot performing the action.
public void onStarted(java.util.Calendar time,
java.lang.Object startedInfo,
java.lang.String actionID,
java.lang.String robotID)
onStarted in interface FeedbackReceivertime - Calendar time of starting an action.startedInfo - Object containing additional (optional) info about the start of the action.actionID - String containing the id of the requested action/information.robotID - String containing the name of the robot performing the action.
public void onAborted(java.util.Calendar time,
java.lang.Object reason,
java.lang.String actionID,
java.lang.String robotID)
onAborted in interface FeedbackReceivertime - Calendar time of aborting an action.reason - Object containing the reason for aborting an action.actionID - String containing the id of the requested action/information.robotID - String containing the name of the robot performing the action.
public void receiveKAoSStatus(java.lang.String statusMsg,
java.lang.String actionID,
java.lang.String robotID)
receiveKAoSStatus in interface FeedbackReceiverstatusMsg - Object containing the result of the requested action/information.actionID - String containing the id of the requested action/information.robotID - String containing the name of the robot performing the action.
public void update(java.lang.String observableID,
java.lang.String updateType,
java.lang.Object updateCondition,
java.lang.Object update)
update in interface KAoSObserverobservableID - String identifying the KAoSObservable sending the update.updateType - String indicating type of update.update - Object containing the update.updateCondition - String describing the condition of the update.public java.lang.String getID()
getID in interface KAoSObserverpublic static java.lang.String addNamePrefix(java.lang.String name)
name - agent name
public java.lang.String stripNamePrefix(java.lang.String name)
name - agent name
public java.lang.String stripOntologyURL(java.lang.String givenAction)
givenAction - ontological definitino of an action
public boolean checkUserObservation()
public boolean checkStepByStepIDBuild()
public java.lang.String checkUserStatus()
public static void main(java.lang.String[] args)
throws java.lang.Exception
name - Name of agenttransport - Method of transport
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||