Class Monitor
Package: keychain.core.monitor
Inheritance: Monitor
Description
Monitor
subscribes to block updates from the blockchain and updates the database cache state of personas and contacts. Monitor
updates attributes such as number of confirmations, public keys and metadata, certificate transaction data. A thread for monitoring the blockchain state is created in the on_start()
method.
Method Specifically, note that the |
Without at least one Monitor
the Gateway
will run out of sync with the blockchain and will cause the Gateway
to not be able to perform cryptographic operations properly on subsequent data. Thus, you should ensure that a Monitor
is instantiated within the current Activity.
Since: v2.0
Public Constructors
Constructor |
---|
Creates a |
Public Member Functions Detail
on_pause
|
|
Pause the monitor thread. Block the monitor thread if it was unblocked and running. The thread will remain blocked until |
on_resume
|
|
Run/resume the monitor thread. This method starts/unblocks the monitor thread if it was blocked or not running. If the thread does not exist upon calling |
on_start
|
|
Create the monitor thread if it did not exist. Note that this does not start the thread. Use |
on_stop
|
|||
Stop and destroy the monitor thread if it exists. If the thread is running upon entry in this method, this method will (safely) cause the thread to stop execution before destroying it.
|