public class CommandHistoryRequestManager
extends com.google.common.util.concurrent.AbstractService
| Constructor and Description |
|---|
CommandHistoryRequestManager(Processor processor) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCommand(PreparedCommand pc)
Called when a new command has to be added to the command history
(i.e.
|
void |
addSubscription(CommandHistoryFilter filter,
CommandHistoryConsumer consumer)
Called by the CommandHistoryImpl to move the subscription from another command history manager to this one
|
protected void |
doStart() |
protected void |
doStop() |
String |
getInstance() |
Commanding.CommandHistoryEntry |
subscribeCommand(Commanding.CommandId cmdId,
CommandHistoryConsumer consumer)
Add a consumer to the subscriber list for a command
|
int |
subscribeCommandHistory(String commandsOrigin,
long commandsSince,
CommandHistoryConsumer consumer)
Called by the CommandHistory consumers when they want to receive all updates corresponding
to a command.
|
void |
unsubscribeCommand(Commanding.CommandId cmdId,
CommandHistoryConsumer consumer)
removes a consumer from the subscribers for a command (if existing).
|
CommandHistoryFilter |
unsubscribeCommandHistory(int id)
Called by the CommandHistory consumers to remove the subscription
|
void |
updateCommand(Commanding.CommandId cmdId,
String key,
Value value)
send updates.
|
public CommandHistoryRequestManager(Processor processor) throws ConfigurationException
ConfigurationExceptionpublic Commanding.CommandHistoryEntry subscribeCommand(Commanding.CommandId cmdId, CommandHistoryConsumer consumer) throws InvalidCommandId
cmdId - consumer - InvalidCommandIdpublic void unsubscribeCommand(Commanding.CommandId cmdId, CommandHistoryConsumer consumer)
cmdId - consumer - public int subscribeCommandHistory(String commandsOrigin, long commandsSince, CommandHistoryConsumer consumer)
commandsOrigin - commandsSince - consumer - public CommandHistoryFilter unsubscribeCommandHistory(int id)
id - public void addSubscription(CommandHistoryFilter filter, CommandHistoryConsumer consumer)
filter - public void addCommand(PreparedCommand pc)
public void updateCommand(Commanding.CommandId cmdId, String key, Value value) throws InvalidCommandId
cmdId - key - value - InvalidCommandId - the command does not appear in the activeCommands hashprotected void doStart()
doStart in class com.google.common.util.concurrent.AbstractServiceprotected void doStop()
doStop in class com.google.common.util.concurrent.AbstractServicepublic String getInstance()
Copyright © 2018 Space Applications Services. All rights reserved.