Preferences.AddNodeChangeListener(INodeChangeListener) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers the specified listener to receive node change events for this node.
[Android.Runtime.Register("addNodeChangeListener", "(Ljava/util/prefs/NodeChangeListener;)V", "GetAddNodeChangeListener_Ljava_util_prefs_NodeChangeListener_Handler")]
public abstract void AddNodeChangeListener (Java.Util.Prefs.INodeChangeListener? ncl);
[<Android.Runtime.Register("addNodeChangeListener", "(Ljava/util/prefs/NodeChangeListener;)V", "GetAddNodeChangeListener_Ljava_util_prefs_NodeChangeListener_Handler")>]
abstract member AddNodeChangeListener : Java.Util.Prefs.INodeChangeListener -> unit
Parameters
The NodeChangeListener
to add.
- Attributes
Exceptions
if the given listener is null
.
if this node has been removed.
Remarks
Registers the specified listener to receive node change events for this node. A node change event is generated when a child node is added to or removed from this node. (A single #removeNode()
invocation results in multiple node change events, one for every node in the subtree rooted at the removed node.)
Events are only guaranteed for changes made within the same JVM as the registered listener, though some implementations may generate events for changes made outside this JVM. Events may be generated before the changes have become permanent. Events are not generated when indirect descendants of this node are added or removed; a caller desiring such events must register with each descendant.
Few guarantees can be made regarding node creation. Because nodes are created implicitly upon access, it may not be feasible for an implementation to determine whether a child node existed in the backing store prior to access (for example, because the backing store is unreachable or cached information is out of date). Under these circumstances, implementations are neither required to generate node change events nor prohibited from doing so.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.