Package org.yamcs.http.websocket
Interface WebSocketResource
-
- All Known Implementing Classes:
AlarmResource,CommandHistoryResource,EventResource,LinkResource,PacketResource,ParameterResource,StreamResource,TimeResource
public interface WebSocketResourceA 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 StringgetName()default WebSocketReplyprocessRequest(WebSocketDecodeContext ctx, WebSocketDecoder decoder)Process a request and return a reply.voidselectProcessor(Processor processor)voidsocketClosed()Called when the web socket is closedWebSocketReplysubscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder)default WebSocketReplysubscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder, String argument)default WebSocketReplysubscribeAll(WebSocketDecodeContext ctx, WebSocketDecoder decoder)voidunselectProcessor()WebSocketReplyunsubscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder)default WebSocketReplyunsubscribeAll(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
-
-