The example polling notification implementation shown in
Example Polling Notification:
SimpleNotification monitors the contents of a directory and sends notifications when files are added to, or removed from, the directory. Although this example is very simple, it demonstrates most of the notification capabilities, except for callbacks.
Note:
This example implements a design strategy that enables you to encapsulate the resource domain support inside an adapter service or notification. This strategy is discussed in
An Alternative Approach to Organizing
Resource Domains. You do not need to fully understand this strategy to understand the example code. However, if you are uncomfortable with this strategy, you may implement those methods in your connection implementation. You will have to adjust the method signatures and the "this" references appropriately. The "this" reference refers to the notification. If you move the methods to the connection, then the "this" refers to the connection.