Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IResourceOwner

interface IResourceOwner
Extends com.amazon.apmf.IStandard This interface represents an entity that owns a resource. Usage: To acquire an instance of IResourceOwner, you need to query this interface on an ILifecycleOwner instance.

Methods

addObserver()

com.amazon.apmf.ISubscription* addObserver(IResourceObserver* observer)
Add an IResourceObserver to this IResourceOwner. The observer can be used to listen to different resource events.

Parameters

observer
IResourceObserver* — Required The IResourceObserver to add.

Returns

com.amazon.apmf.ISubscription* An ISubscription that can be used to remove the IResourceObserver. Although this always returns a valid ISubscription, the observer callbacks will not be executed if the IResourceObserver detaches from the window. It is always safe to call ISubscription::unsubscribe.
Last modified on October 29, 2026