public class BitstampPusherService extends BitstampBasePollingService implements StreamingExchangeService
Streaming trade service for the Bitstamp exchange
exchange
Constructor and Description |
---|
BitstampPusherService(Exchange exchange,
BitstampStreamingConfiguration configuration)
Constructor
|
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()
Query the current state of the socket.
|
void |
send(String msg)
Sends a msg over the socket.
|
getExchangeSymbols, verifyOrder, verifyOrder, verifyOrder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getExchangeSymbols
public BitstampPusherService(Exchange exchange, BitstampStreamingConfiguration configuration)
exchange
- configuration
- public void connect()
StreamingExchangeService
Opens the connection to the upstream server for this instance.
connect
in interface StreamingExchangeService
public void disconnect()
StreamingExchangeService
Closes the connection to the upstream server for this instance.
disconnect
in interface StreamingExchangeService
public ExchangeEvent getNextEvent() throws InterruptedException
Returns next event in consumer event queue, then removes it.
getNextEvent
in interface StreamingExchangeService
InterruptedException
public int countEventsAvailable()
Returns number of events in consumer event queue.
countEventsAvailable
in interface StreamingExchangeService
public void send(String msg)
Sends a msg over the socket.
send
in interface StreamingExchangeService
public org.java_websocket.WebSocket.READYSTATE getWebSocketStatus()
Query the current state of the socket.
getWebSocketStatus
in interface StreamingExchangeService
Copyright © 2012–2017 Xeiam, LLC. All rights reserved.