public class ConnectedState extends AbstractHardwareWalletState
State to provide the following to hardware wallet clients:
The "connected" state is a transitional state occurring when the underlying communication transport confirms connection. In USB terms the device is claimed, in a socket the server has accepted.
The next state is normally Initialised
Constructor and Description |
---|
ConnectedState() |
Modifier and Type | Method and Description |
---|---|
void |
await(HardwareWalletContext context)
Invoke the state's awaiting behaviour.
|
protected void |
internalTransition(HardwareWalletClient client,
HardwareWalletContext context,
MessageEvent event)
Initiate a move to the next state through the given client.
|
handleUnexpectedMessageEvent, transition
public void await(HardwareWalletContext context)
HardwareWalletState
Invoke the state's awaiting behaviour. This may cause an immediate state transition (such as from Attached to Connected) or it may start a background process to wait for an event.
await
in interface HardwareWalletState
await
in class AbstractHardwareWalletState
context
- The current context providing parameters for decisionsprotected void internalTransition(HardwareWalletClient client, HardwareWalletContext context, MessageEvent event)
AbstractHardwareWalletState
Initiate a move to the next state through the given client.
Typically the client is used to move in to or out of a "waiting state" and the context is updated with new data
internalTransition
in class AbstractHardwareWalletState
client
- The hardware wallet client for sending messagescontext
- The current context providing parameters for decisionsevent
- The event driving the transitionCopyright © 2013–2016 Bitcoin Solutions Ltd. All rights reserved.