Class GateioStreamingService
java.lang.Object
info.bitrich.xchangestream.service.ConnectableService
info.bitrich.xchangestream.service.netty.NettyStreamingService<GateioWsNotification>
info.bitrich.xchangestream.gateio.GateioStreamingService
-
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.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
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
getSubscribeMessage
(String uniqueChannelName, Object... args) Returns a JSON String containing the subscription message.getUnsubscribeMessage
(String uniqueChannelName, Object... args) Returns a JSON String containing the unsubscribe message.protected io.netty.handler.codec.http.websocketx.extensions.WebSocketClientExtensionHandler
protected void
handleChannelMessage
(String channel, GateioWsNotification message) void
messageHandler
(String message) Handler that receives incoming messages.io.reactivex.rxjava3.core.Observable<GateioWsNotification>
subscribeChannel
(String channelName, Object... args) Methods inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
disconnect, getChannel, getCustomHeaders, getSubscriptionUniqueId, getWebSocketClientHandler, handleChannelError, handleError, handleIdle, handleMessage, isSocketOpen, openConnection, resubscribeChannels, sendMessage, setAcceptAllCertificates, setAutoReconnect, setEnableLoggingHandler, setLoggingHandlerLevel, setSocksProxyHost, setSocksProxyPort, subscribeConnectionState, subscribeConnectionSuccess, subscribeDisconnect, subscribeIdle, subscribeReconnectFailure, useCompressedMessages
Methods inherited from class info.bitrich.xchangestream.service.ConnectableService
connect, setBeforeConnectionHandler
-
Constructor Details
-
GateioStreamingService
-
-
Method Details
-
getChannelNameFromMessage
- Specified by:
getChannelNameFromMessage
in classNettyStreamingService<GateioWsNotification>
-
subscribeChannel
public io.reactivex.rxjava3.core.Observable<GateioWsNotification> subscribeChannel(String channelName, Object... args) - Overrides:
subscribeChannel
in classNettyStreamingService<GateioWsNotification>
-
getSubscribeMessage
Returns a JSON String containing the subscription message.- Specified by:
getSubscribeMessage
in classNettyStreamingService<GateioWsNotification>
- Parameters:
uniqueChannelName
- e.g. spot.order_book-BTC/USDTargs
- CurrencyPair to subscribe and additional channel-specific arguments- Returns:
- subscription message
- Throws:
IOException
-
getWebSocketClientExtensionHandler
protected io.netty.handler.codec.http.websocketx.extensions.WebSocketClientExtensionHandler getWebSocketClientExtensionHandler()- Overrides:
getWebSocketClientExtensionHandler
in classNettyStreamingService<GateioWsNotification>
-
getUnsubscribeMessage
Returns a JSON String containing the unsubscribe message.- Specified by:
getUnsubscribeMessage
in classNettyStreamingService<GateioWsNotification>
- Parameters:
uniqueChannelName
- e.g. spot.order_book-BTC/USDTargs
- CurrencyPair to subscribe and additional channel-specific arguments- Returns:
- unsubscribe message
- Throws:
IOException
-
messageHandler
Description copied from class:NettyStreamingService
Handler that receives incoming messages.- Specified by:
messageHandler
in classNettyStreamingService<GateioWsNotification>
- Parameters:
message
- Content of the message from the server.
-
handleChannelMessage
- Overrides:
handleChannelMessage
in classNettyStreamingService<GateioWsNotification>
-