Class CommandHistoryRequestManager

All Implemented Interfaces:

public class CommandHistoryRequestManager extends
Part of processors: handles filtered requests for command history. We handle two kind of subscriptions:
  • subscription to specific commands
  • subscription to all the commands but filtered on source and time.
It receives commands from the cmd_history stream
  • Constructor Details

  • Method Details

    • subscribeCommand

      Add a consumer to the subscriber list for a command
      cmdId -
      consumer -
      all the entries existing so far for the command
    • unsubscribeCommand

      public void unsubscribeCommand(Commanding.CommandId cmdId, CommandHistoryConsumer consumer)
      removes a consumer from the subscribers for a command (if existing).
      cmdId -
      consumer -
    • subscribeCommandHistory

      public CommandHistoryFilter subscribeCommandHistory(String commandsOrigin, long commandsSince, CommandHistoryConsumer consumer)
      Called by the CommandHistory consumers when they want to receive all updates corresponding to a command.
    • unsubscribeCommandHistory

      public CommandHistoryFilter unsubscribeCommandHistory(int id)
      Called by the CommandHistory consumers to remove the subscription
      id -
    • addSubscription

      public void addSubscription(CommandHistoryFilter filter, CommandHistoryConsumer consumer)
      Called by the CommandHistoryImpl to move the subscription from another command history manager to this one
      filter -
    • addCommand

      public void addCommand(PreparedCommand pc)
      Called when a new command has to be added to the command history (i.e. when a users sends a telecommand)
    • updateCommand

      public void updateCommand(Commanding.CommandId cmdId, List<Attribute> attrs)
      send updates.
      cmdId -
      attrs -
    • commandFinished

      public void commandFinished(Commanding.CommandId cmdId)
      Called when there can be no more events for this command.

      We remove it from the active commands only after a few seconds because some tools may subscribe to it after being sent and if there was no verifier, the command would immediately disappear so the subscription would fail.

    • doStart

      protected void doStart()
      Specified by:
      doStart in class
    • doStop

      protected void doStop()
      Specified by:
      doStop in class
    • getInstance

      public String getInstance()