Package edu.tufts.hrilab.temiv3
Class UIComponent
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.temiv3.UIComponent
- All Implemented Interfaces:
ActionListener
- Direct Known Subclasses:
FirebaseConnectionComponent
-
Field Summary
Fields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, log, shouldRunExecutionLoop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidprotected List<org.apache.commons.cli.Option>Command line options available in sub-class.voidvoidprotected voidThis is where any code that needs to be called repeatedly in a dedicated thread should live.protected voidinit()Perform any component initialization.voidnotifyActiveGoalUpdated(Goal g, ExecutionManager.UpdateType updateType, GoalStatus status) voidnotifyPendingGoalUpdated(Goal g, int index, ExecutionManager.UpdateType updateType) abstract voidonActionGenerated(ActionDBEntry action, boolean onStartup) abstract voidonActiveGoalsUpdated(List<String> agentStrings, List<String> goalStrings, List<Long> gids, List<String> goalStatuses, List<String> goalPriorityTiers) abstract voidonAgentActionUpdated(String actor, String goal, String status) abstract voidonBeliefNotificationUpdate(String queryTermString, Map<String, Object> bindingsStrings) abstract voidonDictionaryEntriesUpdated(Set<String> keys) voidonNewActionsCallback(List<ActionDBEntry> actions) abstract voidonPendingGoalsUpdated(List<String> agentStrings, List<String> goalStrings, List<Long> gids, List<String> goalStatuses, List<String> goalPriorityTiers) protected voidparseArgs(org.apache.commons.cli.CommandLine cmdLine) Called directly after construction to pass runtime values that will override default values.voidstepComplete(Context step) voidstepStarted(Context step) Methods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
createInstance, createInstance, createInstance, createInstance, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, main, shutdown, shutdownComponent
-
Constructor Details
-
UIComponent
public UIComponent()
-
-
Method Details
-
init
protected void init()Description copied from class:DiarcComponentPerform any component initialization. This should not be used for setting local fields to default values as was the case in DIARC. This method is called after the constructor, and after parseArgs. Setting default values should be done in field declaration or in the constructor.- Overrides:
initin classDiarcComponent
-
additionalUsageInfo
Description copied from class:DiarcComponentCommand line options available in sub-class. This should be paired with a parseArgs implementation.- Overrides:
additionalUsageInfoin classDiarcComponent- Returns:
-
parseArgs
protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine) Description copied from class:DiarcComponentCalled directly after construction to pass runtime values that will override default values. This should parse all the options that additionalUsageInfo provides.zs- Overrides:
parseArgsin classDiarcComponent
-
executionLoop
protected void executionLoop()Description copied from class:DiarcComponentThis is where any code that needs to be called repeatedly in a dedicated thread should live. It is not called by default and you must set shouldRunExecutionLoop to true in your constructor.- Overrides:
executionLoopin classDiarcComponent
-
onAgentActionUpdated
-
onActiveGoalsUpdated
-
onPendingGoalsUpdated
-
onActionGenerated
-
onBeliefNotificationUpdate
-
onDictionaryEntriesUpdated
-
notifyPendingGoalUpdated
-
notifyActiveGoalUpdated
public void notifyActiveGoalUpdated(Goal g, ExecutionManager.UpdateType updateType, GoalStatus status) -
onNewActionsCallback
-
beliefNotificationCallback
-
actionStarted
- Specified by:
actionStartedin interfaceActionListener
-
actionComplete
- Specified by:
actionCompletein interfaceActionListener
-
stepStarted
- Specified by:
stepStartedin interfaceActionListener
-
stepComplete
- Specified by:
stepCompletein interfaceActionListener
-
addRelevantDisplayAction
-
convertArgToReadable
-