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
Modifier and TypeMethodDescriptiongetName()
default WebSocketReply
processRequest
(WebSocketDecodeContext ctx, WebSocketDecoder decoder) Process a request and return a reply.void
selectProcessor
(Processor processor) void
Called when the web socket is closedsubscribe
(WebSocketDecodeContext ctx, WebSocketDecoder decoder) default WebSocketReply
subscribe
(WebSocketDecodeContext ctx, WebSocketDecoder decoder, String argument) default WebSocketReply
subscribeAll
(WebSocketDecodeContext ctx, WebSocketDecoder decoder) void
unsubscribe
(WebSocketDecodeContext ctx, WebSocketDecoder decoder) default WebSocketReply
unsubscribeAll
(WebSocketDecodeContext ctx, WebSocketDecoder decoder)
-
Method Details
-
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
- Throws:
ProcessorException
-
unselectProcessor
void unselectProcessor() -
socketClosed
void socketClosed()Called when the web socket is closed
-