public class MeXBTStreamingService extends Object implements StreamingExchangeService
| Constructor and Description |
|---|
MeXBTStreamingService(Exchange exchange) |
MeXBTStreamingService(Exchange exchange,
MeXBTExchangeStreamingConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Opens the connection to the upstream server for this instance.
|
int |
countEventsAvailable()
Returns number of events in consumer event queue.
|
void |
disconnect()
Closes the connection to the upstream server for this instance.
|
ExchangeEvent |
getNextEvent()
Returns next event in consumer event queue, then removes it.
|
org.java_websocket.WebSocket.READYSTATE |
getWebSocketStatus()
Returns current state of websocket connection.
|
void |
send(String msg)
Sends a msg over the socket.
|
public MeXBTStreamingService(Exchange exchange)
public MeXBTStreamingService(Exchange exchange, MeXBTExchangeStreamingConfiguration configuration)
public void connect()
Opens the connection to the upstream server for this instance.
connect in interface StreamingExchangeServicepublic void disconnect()
Closes the connection to the upstream server for this instance.
disconnect in interface StreamingExchangeServicepublic ExchangeEvent getNextEvent() throws InterruptedException
Returns next event in consumer event queue, then removes it.
getNextEvent in interface StreamingExchangeServiceInterruptedExceptionpublic int countEventsAvailable()
Returns number of events in consumer event queue.
countEventsAvailable in interface StreamingExchangeServicepublic void send(String msg)
Sends a msg over the socket.
send in interface StreamingExchangeServicepublic org.java_websocket.WebSocket.READYSTATE getWebSocketStatus()
getWebSocketStatus in interface StreamingExchangeServiceCopyright © 2012–2017 Xeiam, LLC. All rights reserved.