public class MessageEvent extends Object
Low level event to provide the following to client API:
Messages wrap the adapted raw data from the specific hardware wallet (e.g. initialise, reset etc)
If a message is not present then the event wraps the general state of a hardware wallet (e.g. connected, disconnected etc)
Constructor and Description |
---|
MessageEvent(MessageEventType eventType,
com.google.common.base.Optional<HardwareWalletMessage> message,
com.google.common.base.Optional<com.google.protobuf.Message> rawMessage,
String source) |
Modifier and Type | Method and Description |
---|---|
MessageEventType |
getEventType() |
com.google.common.base.Optional<HardwareWalletMessage> |
getMessage() |
com.google.common.base.Optional<com.google.protobuf.Message> |
getRawMessage() |
String |
getSource() |
public MessageEvent(MessageEventType eventType, com.google.common.base.Optional<HardwareWalletMessage> message, com.google.common.base.Optional<com.google.protobuf.Message> rawMessage, String source)
eventType
- The message event type (e.g. INITIALISE, PING etc)message
- The adapted hardware wallet messagerawMessage
- The raw protobuf message from the hardware walletsource
- The client name acting as the source (e.g. "TREZOR", "KEEP_KEY" etc)public MessageEventType getEventType()
public com.google.common.base.Optional<HardwareWalletMessage> getMessage()
public com.google.common.base.Optional<com.google.protobuf.Message> getRawMessage()
public String getSource()
Copyright © 2013–2017 Bitcoin Solutions Ltd. All rights reserved.