Java DTV API 1.3
18-Nov-2009

com.sun.dtv.platform
Interface UserPropertyListener

All Superinterfaces:
EventListener

public interface UserPropertyListener
extends EventListener

Optionally an application may attach a UserPropertyListener to the user properties sub-system to stay informed about any changes of any user properties. That includes also user properties created and managed by applications and third party libraries.

This listener is to be attached using the User.addListener() method and detached using the User.removeListener(). The application can configure the sensitivity of the listener by setting a filter describing which properties are to be monitored. The listener will then be triggered by the implementation as soon as any of the properties relevant for that mask are removed or have their value changed.


Method Summary
 void propertyChanged(String key, String oldValue, String newValue)
          Reports that the value of the property identified by key has changed from oldValue to newValue.
 void propertyRemoved(String key, String oldValue)
          Reports that the property identified by key has been removed from the user properties.
 

Method Detail

propertyChanged

void propertyChanged(String key,
                     String oldValue,
                     String newValue)
Reports that the value of the property identified by key has changed from oldValue to newValue. This method must only be triggered when newValue is different from oldValue.

Parameters:
key - The key of the property which value has changed.
oldValue - The value associated to key before the change occurred.
newValue - The value associated to key after the change occurred.

propertyRemoved

void propertyRemoved(String key,
                     String oldValue)
Reports that the property identified by key has been removed from the user properties. It also gives along the previous value that was associated with this key.

Note: specifically in the case where a whole subtree of the user properties is removed, only properties that actually have a value must trigger this interface.

Parameters:
key - The key of the property which value has changed.
oldValue - The value associated to key before that property was removed.

Java DTV API 1.3
18-Nov-2009

Copyright © 2008-2009 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.Products covered by and information contained in this service manual are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited.

DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

Use of this document is subject to license terms.