Class KrakenStreamingService
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.kraken.KrakenStreamingService
- Author:
- makarid, pchertalev
-
Nested Class Summary
Nested classes/interfaces inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
NettyStreamingService.NettyWebSocketClientHandler, NettyStreamingService.Subscription
-
Field Summary
Fields inherited from class info.bitrich.xchangestream.service.netty.JsonNettyStreamingService
objectMapper
Fields inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
DEFAULT_CONNECTION_TIMEOUT, DEFAULT_IDLE_TIMEOUT, DEFAULT_RETRY_DURATION, uri
Fields inherited from class info.bitrich.xchangestream.service.ConnectableService
BEFORE_CONNECTION_HANDLER
-
Constructor Summary
ConstructorDescriptionKrakenStreamingService
(KrakenStreamingExchange exchange, boolean isPrivate, String uri, int maxFramePayloadLength, Duration connectionTimeout, Duration retryDuration, int idleTimeoutSeconds, Supplier<KrakenWebsocketToken> authData) KrakenStreamingService
(KrakenStreamingExchange exchange, boolean isPrivate, String uri, Supplier<KrakenWebsocketToken> authData) -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Completable
protected String
getChannelNameFromMessage
(com.fasterxml.jackson.databind.JsonNode message) getSubscribeMessage
(String channelName, Object... args) getUnsubscribeMessage
(String channelName, Object... args) protected io.netty.handler.codec.http.websocketx.extensions.WebSocketClientExtensionHandler
protected WebSocketClientHandler
getWebSocketClientHandler
(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker, WebSocketClientHandler.WebSocketMessageHandler handler) protected void
handleMessage
(com.fasterxml.jackson.databind.JsonNode message) boolean
void
sendMessage
(String message) io.reactivex.rxjava3.core.Observable<KrakenEvent>
subscribeSystemChannel
(KrakenEventType eventType) Methods inherited from class info.bitrich.xchangestream.service.netty.JsonNettyStreamingService
messageHandler, sendObjectMessage
Methods inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
getChannel, getCustomHeaders, getSubscriptionUniqueId, handleChannelError, handleChannelMessage, handleError, handleIdle, isSocketOpen, openConnection, resubscribeChannels, setAcceptAllCertificates, setAutoReconnect, setEnableLoggingHandler, setLoggingHandlerLevel, setSocksProxyHost, setSocksProxyPort, subscribeChannel, subscribeConnectionState, subscribeConnectionSuccess, subscribeDisconnect, subscribeIdle, subscribeReconnectFailure, useCompressedMessages
Methods inherited from class info.bitrich.xchangestream.service.ConnectableService
connect, setBeforeConnectionHandler
-
Constructor Details
-
KrakenStreamingService
public KrakenStreamingService(KrakenStreamingExchange exchange, boolean isPrivate, String uri, Supplier<KrakenWebsocketToken> authData) -
KrakenStreamingService
public KrakenStreamingService(KrakenStreamingExchange exchange, boolean isPrivate, String uri, int maxFramePayloadLength, Duration connectionTimeout, Duration retryDuration, int idleTimeoutSeconds, Supplier<KrakenWebsocketToken> authData)
-
-
Method Details
-
processArrayMessageSeparately
public boolean processArrayMessageSeparately()- Overrides:
processArrayMessageSeparately
in classJsonNettyStreamingService
-
getWebSocketClientExtensionHandler
protected io.netty.handler.codec.http.websocketx.extensions.WebSocketClientExtensionHandler getWebSocketClientExtensionHandler()- Overrides:
getWebSocketClientExtensionHandler
in classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-
subscribeSystemChannel
public io.reactivex.rxjava3.core.Observable<KrakenEvent> subscribeSystemChannel(KrakenEventType eventType) -
disconnect
public io.reactivex.rxjava3.core.Completable disconnect()- Overrides:
disconnect
in classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-
handleMessage
protected void handleMessage(com.fasterxml.jackson.databind.JsonNode message) - Overrides:
handleMessage
in classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-
getChannelNameFromMessage
protected String getChannelNameFromMessage(com.fasterxml.jackson.databind.JsonNode message) throws IOException - Specified by:
getChannelNameFromMessage
in classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
- Throws:
IOException
-
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
-
sendMessage
- Overrides:
sendMessage
in classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-
getWebSocketClientHandler
protected WebSocketClientHandler getWebSocketClientHandler(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker, WebSocketClientHandler.WebSocketMessageHandler handler) - Overrides:
getWebSocketClientHandler
in classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-