Package org.yamcs.http.websocket
Class InstanceResource
- java.lang.Object
-
- org.yamcs.http.websocket.InstanceResource
-
- All Implemented Interfaces:
WebSocketResource,ManagementListener
public class InstanceResource extends Object implements WebSocketResource, ManagementListener
Provides lifecycle updates on one or all instances.
-
-
Constructor Summary
Constructors Constructor Description InstanceResource(ConnectedWebSocketClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()voidinstanceStateChanged(YamcsServerInstance ysi)Called when an instance state changes - for example when it is stopped/startedvoidselectProcessor(Processor processor)voidsocketClosed()Called when the web socket is closedWebSocketReplysubscribe(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
clientInfoChanged, clientRegistered, clientUnregistered, processorAdded, processorClosed, processorStateChanged, serviceRegistered, serviceUnregistered, statisticsUpdated
-
Methods inherited from interface org.yamcs.http.websocket.WebSocketResource
processRequest, subscribe, subscribeAll, unsubscribeAll
-
-
-
-
Constructor Detail
-
InstanceResource
public InstanceResource(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
-
selectProcessor
public void selectProcessor(Processor processor) throws ProcessorException
- Specified by:
selectProcessorin interfaceWebSocketResource- Throws:
ProcessorException
-
unselectProcessor
public void unselectProcessor()
- Specified by:
unselectProcessorin interfaceWebSocketResource
-
socketClosed
public void socketClosed()
Description copied from interface:WebSocketResourceCalled when the web socket is closed- Specified by:
socketClosedin interfaceWebSocketResource
-
instanceStateChanged
public void instanceStateChanged(YamcsServerInstance ysi)
Description copied from interface:ManagementListenerCalled when an instance state changes - for example when it is stopped/started- Specified by:
instanceStateChangedin interfaceManagementListener
-
-