Class TradeServiceAdapter

java.lang.Object
edu.tufts.hrilab.gui.GuiAdapter
edu.tufts.hrilab.gui.TradeServiceAdapter

public class TradeServiceAdapter extends GuiAdapter
TradeServiceAdapter. Adapter class that provides information to the frontend about what TRADE services are available. Also serves as an endpoint for the frontend to invoke TRADE services.
See Also:
  • Constructor Details

    • TradeServiceAdapter

      public TradeServiceAdapter(Collection<String> groups)
      Constructor.
      Parameters:
      groups - the groups that the associated DIARC component belongs to
  • Method Details

    • init

      protected void init()
      Initialization after construction and after TRADE services are registered.
      Overrides:
      init in class GuiAdapter
    • 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.
    • 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.
    • getPathRoot

      protected 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.