Package velox.api.layer1.messages
Class SelectAccountMessage
java.lang.Object
velox.api.layer1.messages.SelectAccountMessage
This message requests account selection. Should be sent via
Layer1ApiAdminListener.onUserMessage(Object)-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSelectAccountMessage(AccountInfo[] accountsInfo) Constructs new account selection request -
Method Summary
-
Field Details
-
accountsInfo
Array of accounts to select from
-
-
Constructor Details
-
SelectAccountMessage
Constructs new account selection request- Parameters:
accountsInfo- accounts to select from
-
-
Method Details
-
set
public void set(int selectedIndex) Sets selected account index after selection is performed. Should be called once. This unblocks all pendingget()calls and prevents blocking further ones.- Parameters:
selectedIndex- index inaccountsInfoarray
-
get
Waits till selection is done and returns index of account that was selected. Can be called from multiple places.- Returns:
- index of selected account in array passed to
SelectAccountMessage(AccountInfo[])and available asaccountsInfo - Throws:
InterruptedException- if the current thread is interrupted while waiting
-
toString
-