Package org.yamcs.http.websocket
Class CommandHistoryResource
- java.lang.Object
-
- org.yamcs.http.websocket.CommandHistoryResource
-
- All Implemented Interfaces:
CommandHistoryConsumer,WebSocketResource
public class CommandHistoryResource extends Object implements WebSocketResource, CommandHistoryConsumer
Provides realtime command history subscription via web.
-
-
Constructor Summary
Constructors Constructor Description CommandHistoryResource(ConnectedWebSocketClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddedCommand(PreparedCommand pc)Called when a new command matching the filters has been added to the historyStringgetName()voidselectProcessor(Processor processor)voidsocketClosed()Called when the web socket is closedWebSocketReplysubscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder)voidunselectProcessor()WebSocketReplyunsubscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder)voidupdatedCommand(org.yamcs.protobuf.Commanding.CommandId cmdId, long changeDate, String key, Value value)Called when the history of a command matching the filters has been updated-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.yamcs.cmdhistory.CommandHistoryConsumer
updatedCommand
-
Methods inherited from interface org.yamcs.http.websocket.WebSocketResource
processRequest, subscribe, subscribeAll, unsubscribeAll
-
-
-
-
Constructor Detail
-
CommandHistoryResource
public CommandHistoryResource(ConnectedWebSocketClient client)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceWebSocketResource
-
subscribe
public WebSocketReply subscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder) throws WebSocketException
- Specified by:
subscribein interfaceWebSocketResource- Throws:
WebSocketException
-
unsubscribe
public WebSocketReply unsubscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder) throws WebSocketException
- Specified by:
unsubscribein interfaceWebSocketResource- Throws:
WebSocketException
-
unselectProcessor
public void unselectProcessor()
- Specified by:
unselectProcessorin interfaceWebSocketResource
-
selectProcessor
public void selectProcessor(Processor processor) throws ProcessorException
- Specified by:
selectProcessorin interfaceWebSocketResource- Throws:
ProcessorException
-
addedCommand
public void addedCommand(PreparedCommand pc)
Description copied from interface:CommandHistoryConsumerCalled when a new command matching the filters has been added to the history- Specified by:
addedCommandin interfaceCommandHistoryConsumer
-
updatedCommand
public void updatedCommand(org.yamcs.protobuf.Commanding.CommandId cmdId, long changeDate, String key, Value value)Description copied from interface:CommandHistoryConsumerCalled when the history of a command matching the filters has been updated- Specified by:
updatedCommandin interfaceCommandHistoryConsumer
-
socketClosed
public void socketClosed()
Description copied from interface:WebSocketResourceCalled when the web socket is closed- Specified by:
socketClosedin interfaceWebSocketResource
-
-