Package org.yamcs.http.websocket
Class ConnectedWebSocketClient
- java.lang.Object
-
- org.yamcs.ConnectedClient
-
- org.yamcs.http.websocket.ConnectedWebSocketClient
-
- All Implemented Interfaces:
ManagementListener
public class ConnectedWebSocketClient extends ConnectedClient implements ManagementListener
Runs on the server side and oversees the life cycle of a client web socket connection. Combines multiple types of subscriptions to keep them bundled as one client session.
-
-
Constructor Summary
Constructors Constructor Description ConnectedWebSocketClient(User user, String applicationName, String address, Processor processor, LegacyWebSocketFrameHandler wsHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkSystemPrivilege(int requestId, SystemPrivilege systemPrivilege)
void
instanceStateChanged(YamcsServerInstance ysi)
Called when an instance state changes - for example when it is stopped/startedvoid
processorQuit()
Called when the processor is closing down<T extends com.google.protobuf.Message>
voidsendData(org.yamcs.protobuf.Yamcs.ProtoDataType dataType, T data)
void
sendReply(WebSocketReply reply)
void
setProcessor(Processor newProcessor)
Select or change the processor for this client.void
socketClosed()
-
Methods inherited from class org.yamcs.ConnectedClient
getAddress, getApplicationName, getId, getLoginTime, getProcessor, getUser, setClientId
-
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
-
-
-
-
Constructor Detail
-
ConnectedWebSocketClient
public ConnectedWebSocketClient(User user, String applicationName, String address, Processor processor, LegacyWebSocketFrameHandler wsHandler)
-
-
Method Detail
-
setProcessor
public void setProcessor(Processor newProcessor) throws ProcessorException
Description copied from class:ConnectedClient
Select or change the processor for this client.- Overrides:
setProcessor
in classConnectedClient
- Parameters:
newProcessor
- the processor to select- Throws:
ProcessorException
-
sendReply
public void sendReply(WebSocketReply reply)
-
sendData
public <T extends com.google.protobuf.Message> void sendData(org.yamcs.protobuf.Yamcs.ProtoDataType dataType, T data)
-
processorQuit
public void processorQuit()
Description copied from class:ConnectedClient
Called when the processor is closing down- Overrides:
processorQuit
in classConnectedClient
-
socketClosed
public void socketClosed()
-
instanceStateChanged
public void instanceStateChanged(YamcsServerInstance ysi)
Description copied from interface:ManagementListener
Called when an instance state changes - for example when it is stopped/started- Specified by:
instanceStateChanged
in interfaceManagementListener
-
checkSystemPrivilege
public void checkSystemPrivilege(int requestId, SystemPrivilege systemPrivilege) throws WebSocketException
- Throws:
WebSocketException
-
-