Class GoalViewerAdapter

java.lang.Object
edu.tufts.hrilab.gui.GuiAdapter
edu.tufts.hrilab.action.gui.GoalViewerAdapter

public class GoalViewerAdapter extends GuiAdapter
A WebSocket adapter for communication between the GoalManagerImpl and the frontend Goal Viewer GUI.
See Also:
  • Constructor Details

    • GoalViewerAdapter

      public GoalViewerAdapter(Collection<String> groups)
      Constructor.
  • Method Details

    • handleGoalNotification

      public void handleGoalNotification(GoalInfo info) throws ai.thinkingrobots.trade.TRADEException
      Throws:
      ai.thinkingrobots.trade.TRADEException
    • init

      protected void init()
      Initialization after construction and after TRADE services are registered.
      Overrides:
      init in class GuiAdapter
    • providesTradeServices

      protected boolean providesTradeServices()
      Force implementing classes to declare whether they provide TRADE services. This is to decide whether or not to register any new instances of that class with TRADE.
      Specified by:
      providesTradeServices in class GuiAdapter
      Returns:
      true iff the adapter provides TRADE services.
    • handleMessage

      protected void handleMessage(com.google.gson.JsonObject message)
      Handle a message from the client.
      Overrides:
      handleMessage in class GuiAdapter
      Parameters:
      message - a JsonObject representing the message.
    • getPathRoot

      public String getPathRoot()
      Enforce implementation of path root getter for getPath(). This is usually based on the component's/adapter's name; e.g., the belief GUI's path root is belief.
      Specified by:
      getPathRoot in class GuiAdapter
      Returns:
      the path root as a String.