public class HardwareWalletEvents extends Object
Factory to provide the following to application API:
Modifier and Type | Method and Description |
---|---|
static void |
fireHardwareWalletEvent(HardwareWalletEvent event)
A hardware event can wrap a hardware wallet message adapted from a protocol buffer message
|
static void |
fireHardwareWalletEvent(HardwareWalletEventType eventType,
HardwareWalletMessage message,
String source)
A hardware event can wrap a hardware wallet message adapted from a protocol buffer message
|
static void |
fireHardwareWalletEvent(HardwareWalletEventType eventType,
String source)
A hardware event can have no further information
|
static void |
subscribe(Object subscriber)
Subscribe to events.
|
static void |
unsubscribe(Object subscriber)
Unsubscribe a known subscriber from events.
|
static void |
unsubscribeAll()
Unsubscribe all subscribers from events
|
public static void subscribe(Object subscriber)
Subscribe to events. Repeating a subscribe will not affect the event bus.
This approach ensures all subscribers will be correctly removed during a shutdown or wizard hide event
subscriber
- The subscriber (use the Guava @Subscribe
annotation to subscribe a method)public static void unsubscribe(Object subscriber)
Unsubscribe a known subscriber from events. Providing an unknown object will not affect the event bus.
This approach ensures all subscribers will be correctly removed during a shutdown or wizard hide event
subscriber
- The subscriber (use the Guava @Subscribe
annotation to subscribe a method)public static void unsubscribeAll()
Unsubscribe all subscribers from events
This approach ensures all subscribers will be correctly removed during a shutdown or wizard hide event
public static void fireHardwareWalletEvent(HardwareWalletEventType eventType, HardwareWalletMessage message, String source)
A hardware event can wrap a hardware wallet message adapted from a protocol buffer message
eventType
- The event type (e.g. SHOW_DEVICE_READY)message
- The message itself (from protocol buffers)source
- The client name acting as the source (e.g. "TREZOR", "KEEP_KEY" etc)public static void fireHardwareWalletEvent(HardwareWalletEventType eventType, String source)
A hardware event can have no further information
eventType
- The event type (e.g. SHOW_DEVICE_READY)source
- The client name acting as the source (e.g. "TREZOR", "KEEP_KEY" etc)public static void fireHardwareWalletEvent(HardwareWalletEvent event)
A hardware event can wrap a hardware wallet message adapted from a protocol buffer message
event
- The eventCopyright © 2013–2018 Bitcoin Solutions Ltd. All rights reserved.