Package org.yamcs.http.websocket
Class StreamResource
- java.lang.Object
-
- org.yamcs.http.websocket.StreamResource
-
- All Implemented Interfaces:
WebSocketResource
,StreamSubscriber
public class StreamResource extends Object implements StreamSubscriber, WebSocketResource
Capable of producing and consuming yarch Stream data (Tuples) over web socket
-
-
Constructor Summary
Constructors Constructor Description StreamResource(ConnectedWebSocketClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
void
onTuple(Stream stream, Tuple tuple)
void
selectProcessor(Processor processor)
void
socketClosed()
Called when the web socket is closedvoid
streamClosed(Stream stream)
WebSocketReply
subscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder)
void
unselectProcessor()
WebSocketReply
unsubscribe(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.http.websocket.WebSocketResource
processRequest, subscribe, subscribeAll, unsubscribeAll
-
-
-
-
Constructor Detail
-
StreamResource
public StreamResource(ConnectedWebSocketClient client)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceWebSocketResource
-
subscribe
public WebSocketReply subscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder) throws WebSocketException
- Specified by:
subscribe
in interfaceWebSocketResource
- Throws:
WebSocketException
-
onTuple
public void onTuple(Stream stream, Tuple tuple)
- Specified by:
onTuple
in interfaceStreamSubscriber
-
streamClosed
public void streamClosed(Stream stream)
- Specified by:
streamClosed
in interfaceStreamSubscriber
-
unsubscribe
public WebSocketReply unsubscribe(WebSocketDecodeContext ctx, WebSocketDecoder decoder) throws WebSocketException
- Specified by:
unsubscribe
in interfaceWebSocketResource
- Throws:
WebSocketException
-
selectProcessor
public void selectProcessor(Processor processor) throws ProcessorException
- Specified by:
selectProcessor
in interfaceWebSocketResource
- Throws:
ProcessorException
-
unselectProcessor
public void unselectProcessor()
- Specified by:
unselectProcessor
in interfaceWebSocketResource
-
socketClosed
public void socketClosed()
Description copied from interface:WebSocketResource
Called when the web socket is closed- Specified by:
socketClosed
in interfaceWebSocketResource
-
-