Package xyz.felh.okx.v5.ws
Class SubscribeStateService
java.lang.Object
xyz.felh.okx.v5.ws.SubscribeStateService
This class is to handle all subscribed state
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubscribed(WsChannel wsChannel, WsRequestArg arg) Add param when call subscribevoidconfirmSubscribed(WsChannel wsChannel, WsRequestArg arg) confirm subscribedbooleanhasSubscribed(WsChannel wsChannel, WsRequestArg arg) Check if current channel has been subscribed successfullyvoidremoveSubscribed(WsChannel wsChannel, WsRequestArg arg) remove subscribed datavoidrestoreSubscribed(WsChannel wsChannel) 恢复某个channel的订阅voidsaveLoginInfo(String apiKey, String passphrase, String secretKey) Save last successfully login informationvoidtryLogin()try login again
-
Constructor Details
-
SubscribeStateService
-
-
Method Details
-
saveLoginInfo
Save last successfully login information- Parameters:
apiKey- api keypassphrase- passphrasesecretKey- secretKey
-
hasSubscribed
Check if current channel has been subscribed successfully- Parameters:
wsChannel- channelarg- arg- Returns:
- if current channel has been subscribed
-
addSubscribed
Add param when call subscribe- Parameters:
wsChannel- channelarg- arg
-
confirmSubscribed
confirm subscribed- Parameters:
wsChannel- channelarg- arg
-
removeSubscribed
remove subscribed data- Parameters:
wsChannel- channelarg- arg
-
tryLogin
public void tryLogin()try login again -
restoreSubscribed
恢复某个channel的订阅- Parameters:
wsChannel- channel
-