Class Monitor
-
NSObject
-
KeychainCore/Monitor
-
Monitor
Monitor
subscribes to block updates from the blockchain and updates the database cache state of Persona
and Contacts
accordingly. 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 onStart
method.
Monitor method names should be read as "what the Monitor should do in response to the underlying execution environment entering the specified state". For instance, you should call onStart once your application has set the active persona and is ready to receive updates. Please note that the Monitor thread is not started during onStart; it is merely created during that method. This is because some execution environments (namely mobile device environments) prefer to decouple the creation and start states of applications and intend the start process to be as lightweight as possible. |
Constructors
init:(NSString *) db_path :(long) settingsPtr :(NSError **) error
You should instantiate |
Parameters
Parameter | Description |
---|---|
NSString * dbPath |
File path of the Keychain database |
long settingsPtr |
This is the settings pointer from an instantiated |
Method Summary
Return type | Method and Description |
---|---|
|
Pause (block) the Monitor thread if it was unblocked and running. The thread will remain paused until onResume() is called. |
|
This method starts/unblocks the Monitor thread if it was blocked or not running. If the thread does not exist upon calling |
|
Create the Monitor thread if it does not already exist. |
|
Stop and destroy the Monitor thread if it exists. If the thread is running, this method will (safely) cause the thread to stop execution before destroying the thread. |