Package org.yamcs.http.websocket
Class ProcessorResource
- java.lang.Object
-
- org.yamcs.http.websocket.ProcessorResource
-
- All Implemented Interfaces:
WebSocketResource,ManagementListener
public class ProcessorResource extends Object implements WebSocketResource, ManagementListener
Provides lifecycle updates on one or all processors.
-
-
Constructor Summary
Constructors Constructor Description ProcessorResource(ConnectedWebSocketClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclientInfoChanged(ConnectedClient client)voidclientRegistered(ConnectedClient client)voidclientUnregistered(ConnectedClient client)StringgetName()voidprocessorAdded(org.yamcs.protobuf.ProcessorInfo processorInfo)voidprocessorClosed(org.yamcs.protobuf.ProcessorInfo processorInfo)voidprocessorStateChanged(org.yamcs.protobuf.ProcessorInfo processorInfo)voidselectProcessor(Processor processor)voidsocketClosed()Called when the web socket is closedvoidstatisticsUpdated(Processor processor, org.yamcs.protobuf.Statistics stats)Called by theManagementServicewhen the statistics for the given processor were updated.WebSocketReplysubscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder)Registers for updates on any processor or client.voidunselectProcessor()WebSocketReplyunsubscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.yamcs.management.ManagementListener
instanceStateChanged, serviceRegistered, serviceUnregistered
-
Methods inherited from interface org.yamcs.http.websocket.WebSocketResource
processRequest, subscribe, subscribeAll, unsubscribeAll
-
-
-
-
Constructor Detail
-
ProcessorResource
public ProcessorResource(ConnectedWebSocketClient client)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceWebSocketResource
-
subscribe
public WebSocketReply subscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder) throws WebSocketException
Registers for updates on any processor or client. Sends the current set of processor, and clients (in that order) to the requester.- Specified by:
subscribein interfaceWebSocketResource- Throws:
WebSocketException
-
unsubscribe
public WebSocketReply unsubscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder) throws WebSocketException
- Specified by:
unsubscribein interfaceWebSocketResource- Throws:
WebSocketException
-
socketClosed
public void socketClosed()
Description copied from interface:WebSocketResourceCalled when the web socket is closed- Specified by:
socketClosedin interfaceWebSocketResource
-
processorAdded
public void processorAdded(org.yamcs.protobuf.ProcessorInfo processorInfo)
- Specified by:
processorAddedin interfaceManagementListener
-
processorStateChanged
public void processorStateChanged(org.yamcs.protobuf.ProcessorInfo processorInfo)
- Specified by:
processorStateChangedin interfaceManagementListener
-
processorClosed
public void processorClosed(org.yamcs.protobuf.ProcessorInfo processorInfo)
- Specified by:
processorClosedin interfaceManagementListener
-
selectProcessor
public void selectProcessor(Processor processor) throws ProcessorException
- Specified by:
selectProcessorin interfaceWebSocketResource- Throws:
ProcessorException
-
unselectProcessor
public void unselectProcessor()
- Specified by:
unselectProcessorin interfaceWebSocketResource
-
clientRegistered
public void clientRegistered(ConnectedClient client)
- Specified by:
clientRegisteredin interfaceManagementListener
-
clientInfoChanged
public void clientInfoChanged(ConnectedClient client)
- Specified by:
clientInfoChangedin interfaceManagementListener
-
clientUnregistered
public void clientUnregistered(ConnectedClient client)
- Specified by:
clientUnregisteredin interfaceManagementListener
-
statisticsUpdated
public void statisticsUpdated(Processor processor, org.yamcs.protobuf.Statistics stats)
Description copied from interface:ManagementListenerCalled by theManagementServicewhen the statistics for the given processor were updated. This usually happens at about 1Hz.- Specified by:
statisticsUpdatedin interfaceManagementListener
-
-