public interface Connectable
Utility interface to provide the following to hardware wallet clients and devices:
Modifier and Type | Method and Description |
---|---|
boolean |
attach()
Handle device attachment.
|
boolean |
connect()
Attempt a connection to the underlying hardware to establish communication only (no higher level messages)
|
void |
disconnect()
Break the connection to the device
|
void |
hardDetach()
Handle device detachment and imminent shutdown.
|
void |
softDetach()
Handle device detachment.
|
boolean attach()
Handle device attachment. The transport to the device is new formed (device attached, socket server started etc)
Implementations should verify the supporting environment before attempting a connection. Typically this would involve initialising native libraries and verifying their communications
void softDetach()
Handle device detachment. The transport to the device is gone (device removed, socket server shut down etc)
Implementations may assume that recovery is possible (the hardware drivers still remain operational)
void hardDetach()
Handle device detachment and imminent shutdown.
Recovery is not possible (the controlling thread is about to close, hardware drivers are closing)
boolean connect()
Attempt a connection to the underlying hardware to establish communication only (no higher level messages)
Implementers must ensure the following behaviour:
void disconnect()
Break the connection to the device
Implementers must ensure the following behaviour:
Copyright © 2013–2017 Bitcoin Solutions Ltd. All rights reserved.