Package org.yamcs.http.websocket
Interface WebSocketResource
-
- All Known Implementing Classes:
ParameterResource
public interface WebSocketResource
A resource bundles a set of logically related operations. Instances are created for every client session separately.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
getName()
default WebSocketReply
processRequest(WebSocketDecodeContext ctx, WebSocketDecoder decoder)
Process a request and return a reply.void
selectProcessor(Processor processor)
void
socketClosed()
Called when the web socket is closedWebSocketReply
subscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder)
default WebSocketReply
subscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder, String argument)
default WebSocketReply
subscribeAll(WebSocketDecodeContext ctx, WebSocketDecoder decoder)
void
unselectProcessor()
WebSocketReply
unsubscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder)
default WebSocketReply
unsubscribeAll(WebSocketDecodeContext ctx, WebSocketDecoder decoder)
-
-
-
Method Detail
-
getName
String getName()
-
processRequest
default WebSocketReply processRequest(WebSocketDecodeContext ctx, WebSocketDecoder decoder) throws WebSocketException
Process a request and return a reply. The reply can be null if the implementor of the resource takes care itself of sending the reply - this has been added because the parameterClient wants to send some date data immediately after reply- Throws:
WebSocketException
-
subscribe
WebSocketReply subscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder) throws WebSocketException
- Throws:
WebSocketException
-
unsubscribe
WebSocketReply unsubscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder) throws WebSocketException
- Throws:
WebSocketException
-
subscribe
default WebSocketReply subscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder, String argument) throws WebSocketException
- Throws:
WebSocketException
-
subscribeAll
default WebSocketReply subscribeAll(WebSocketDecodeContext ctx, WebSocketDecoder decoder) throws WebSocketException
- Throws:
WebSocketException
-
unsubscribeAll
default WebSocketReply unsubscribeAll(WebSocketDecodeContext ctx, WebSocketDecoder decoder) throws WebSocketException
- Throws:
WebSocketException
-
selectProcessor
void selectProcessor(Processor processor) throws ProcessorException
- Throws:
ProcessorException
-
unselectProcessor
void unselectProcessor()
-
socketClosed
void socketClosed()
Called when the web socket is closed
-
-