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, uriFields inherited from class info.bitrich.xchangestream.service.ConnectableService
BEFORE_CONNECTION_HANDLER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetSubscribeMessage(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.WebSocketClientExtensionHandlerprotected voidhandleChannelMessage(String channel, GateioWsNotification message) voidmessageHandler(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, useCompressedMessagesMethods inherited from class info.bitrich.xchangestream.service.ConnectableService
connect, setBeforeConnectionHandler
-
Constructor Details
-
GateioStreamingService
-
-
Method Details
-
getChannelNameFromMessage
- Specified by:
getChannelNameFromMessagein classNettyStreamingService<GateioWsNotification>
-
subscribeChannel
public io.reactivex.rxjava3.core.Observable<GateioWsNotification> subscribeChannel(String channelName, Object... args) - Overrides:
subscribeChannelin classNettyStreamingService<GateioWsNotification>
-
getSubscribeMessage
Returns a JSON String containing the subscription message.- Specified by:
getSubscribeMessagein 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:
getWebSocketClientExtensionHandlerin classNettyStreamingService<GateioWsNotification>
-
getUnsubscribeMessage
Returns a JSON String containing the unsubscribe message.- Specified by:
getUnsubscribeMessagein 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:NettyStreamingServiceHandler that receives incoming messages.- Specified by:
messageHandlerin classNettyStreamingService<GateioWsNotification>- Parameters:
message- Content of the message from the server.
-
handleChannelMessage
- Overrides:
handleChannelMessagein classNettyStreamingService<GateioWsNotification>
-