Package info.bitrich.xchangestream.okex
Class OkexStreamingService
java.lang.Object
info.bitrich.xchangestream.service.ConnectableService
info.bitrich.xchangestream.service.netty.NettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
info.bitrich.xchangestream.service.netty.JsonNettyStreamingService
info.bitrich.xchangestream.okex.OkexStreamingService
-
Nested Class Summary
Nested classes/interfaces inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
NettyStreamingService.NettyWebSocketClientHandler, NettyStreamingService.Subscription
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class info.bitrich.xchangestream.service.netty.JsonNettyStreamingService
objectMapper
Fields inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
channels, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_IDLE_TIMEOUT, DEFAULT_RETRY_DURATION, uri
Fields inherited from class info.bitrich.xchangestream.service.ConnectableService
BEFORE_CONNECTION_HANDLER
-
Constructor Summary
ConstructorDescriptionOkexStreamingService
(String apiUrl, ExchangeSpecification exchangeSpecification) -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Completable
connect()
protected String
getChannelNameFromMessage
(com.fasterxml.jackson.databind.JsonNode message) getSubscribeMessage
(String channelName, Object... args) getUnsubscribeMessage
(String channelName, Object... args) protected WebSocketClientHandler
getWebSocketClientHandler
(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshake, WebSocketClientHandler.WebSocketMessageHandler handler) void
login()
void
messageHandler
(String message) Handler that receives incoming messages.void
void
setChannelInactiveHandler
(WebSocketClientHandler.WebSocketMessageHandler channelInactiveHandler) Methods inherited from class info.bitrich.xchangestream.service.netty.JsonNettyStreamingService
processArrayMessageSeparately, sendObjectMessage
Methods inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
disconnect, getChannel, getCustomHeaders, getSubscriptionUniqueId, getWebSocketClientExtensionHandler, handleChannelError, handleChannelMessage, handleError, handleIdle, handleMessage, isSocketOpen, openConnection, resubscribeChannels, sendMessage, setAcceptAllCertificates, setAutoReconnect, setEnableLoggingHandler, setLoggingHandlerLevel, setSocksProxyHost, setSocksProxyPort, subscribeChannel, subscribeConnectionState, subscribeConnectionSuccess, subscribeDisconnect, subscribeIdle, subscribeReconnectFailure, useCompressedMessages
Methods inherited from class info.bitrich.xchangestream.service.ConnectableService
setBeforeConnectionHandler
-
Field Details
-
TRADES
- See Also:
-
ORDERBOOK
- See Also:
-
ORDERBOOK5
- See Also:
-
FUNDING_RATE
- See Also:
-
TICKERS
- See Also:
-
USERTRADES
- See Also:
-
-
Constructor Details
-
OkexStreamingService
-
-
Method Details
-
connect
public io.reactivex.rxjava3.core.Completable connect()- Overrides:
connect
in classConnectableService
-
login
public void login() throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
messageHandler
Description copied from class:NettyStreamingService
Handler that receives incoming messages.- Overrides:
messageHandler
in classJsonNettyStreamingService
- Parameters:
message
- Content of the message from the server.
-
getChannelNameFromMessage
- Specified by:
getChannelNameFromMessage
in classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-
getSubscribeMessage
- Specified by:
getSubscribeMessage
in classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
- Throws:
IOException
-
getUnsubscribeMessage
- Specified by:
getUnsubscribeMessage
in classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
- Throws:
IOException
-
getWebSocketClientHandler
protected WebSocketClientHandler getWebSocketClientHandler(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshake, WebSocketClientHandler.WebSocketMessageHandler handler) - Overrides:
getWebSocketClientHandler
in classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-
setChannelInactiveHandler
public void setChannelInactiveHandler(WebSocketClientHandler.WebSocketMessageHandler channelInactiveHandler) -
pingPongDisconnectIfConnected
public void pingPongDisconnectIfConnected()
-