Class BitgetStreamingService
java.lang.Object
info.bitrich.xchangestream.service.ConnectableService
info.bitrich.xchangestream.service.netty.NettyStreamingService<BitgetWsNotification>
info.bitrich.xchangestream.bitget.BitgetStreamingService
- Direct Known Subclasses:
BitgetPrivateStreamingService
-
Nested Class Summary
Nested classes/interfaces inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
NettyStreamingService.NettyWebSocketClientHandler, NettyStreamingService.Subscription -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.fasterxml.jackson.databind.ObjectMapperFields 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 channelName, Object... args) getSubscriptionUniqueId(String channelName, Object... args) getUnsubscribeMessage(String channelName, Object... args) protected voidhandleChannelMessage(String channel, BitgetWsNotification message) protected voidhandleMessage(BitgetWsNotification message) voidmessageHandler(String message) Handler that receives incoming messages.Methods inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
disconnect, getChannel, getCustomHeaders, getWebSocketClientExtensionHandler, getWebSocketClientHandler, handleChannelError, handleError, handleIdle, isSocketOpen, openConnection, resubscribeChannels, sendMessage, setAcceptAllCertificates, setAutoReconnect, setEnableLoggingHandler, setLoggingHandlerLevel, setSocksProxyHost, setSocksProxyPort, subscribeChannel, subscribeConnectionState, subscribeConnectionSuccess, subscribeDisconnect, subscribeIdle, subscribeReconnectFailure, useCompressedMessagesMethods inherited from class info.bitrich.xchangestream.service.ConnectableService
connect, setBeforeConnectionHandler
-
Field Details
-
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
BitgetStreamingService
-
-
Method Details
-
getChannelNameFromMessage
- Specified by:
getChannelNameFromMessagein classNettyStreamingService<BitgetWsNotification>
-
getSubscribeMessage
- Specified by:
getSubscribeMessagein classNettyStreamingService<BitgetWsNotification>- Parameters:
channelName- ignoredargs- [ChannelType,MarketType,Instrument/null]- Returns:
- message to be sent for subscribing
- Throws:
IOException- See Also:
-
getUnsubscribeMessage
- Specified by:
getUnsubscribeMessagein classNettyStreamingService<BitgetWsNotification>- Parameters:
channelName- ignoredargs- [ChannelType,MarketType,Instrument/null]- Returns:
- message to be sent for unsubscribing
- Throws:
IOException- See Also:
-
handleMessage
- Overrides:
handleMessagein classNettyStreamingService<BitgetWsNotification>
-
handleChannelMessage
- Overrides:
handleChannelMessagein classNettyStreamingService<BitgetWsNotification>
-
getSubscriptionUniqueId
- Overrides:
getSubscriptionUniqueIdin classNettyStreamingService<BitgetWsNotification>- Parameters:
channelName- name of channelargs- array with [MarketType,Instrument, ...]- Returns:
- subscription id in form of "marketType_channelName_instrument1_instrumentX"
-
messageHandler
Description copied from class:NettyStreamingServiceHandler that receives incoming messages.- Specified by:
messageHandlerin classNettyStreamingService<BitgetWsNotification>- Parameters:
message- Content of the message from the server.
-