| Name | Company | Phone | |
|---|---|---|---|
| /td> | |||
This example shows one way to use PageBus.store and PageBus.query. The Phone Dialer and SMS components on this page use PageBus.store to advertise subscribers that consume phone numbers.
The Contact List component uses PageBus.query to discover these subscribers and to obtain information about them (icons, descriptions, PageBus subjects to which they are subscribed, etc.). Even though the Contact List knows nothing about what these features do, it dynamically generates buttons allowing the user to invoke them.
The Phone Dialer stores information about itself under the subject "com.tibco.pagebus.ex.feature.phonesub.dialer". The SMS Sender stores the same pieces of information under the subject "com.tibco.pagebus.ex.feature.phonesub.sms".
The Contact List discovers these features by querying "com.tibco.pagebus.ex.feature.phonesub.*" and detects subsequent [de-]activations by subscribing to the same subject. When the Contact List discovers phone-number consumers, it automatically adds buttons that allow the user to invoke them, using icons and text advertised by the discovered features.