Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.netuix.application.notifications
Interface INotificationUserEnumerator

All Superinterfaces
  Serializable

All Known Implementing Classes:
  AggregatingNotificationUserEnumerator, CollectionNotificationUserEnumerator, CommunityMembershipsEnumerator, GroupNotificationUserEnumerator

    public interface INotificationUserEnumerator

extends Serializable

Objects implementing this interface may be used to enumerate the set of users a notification should be sent to. This allows notifications to be sent to large sets of users without necessarily having all of the usernames ever stored in memory.

Implementations of this interface must be serializable, as the enumeration may well be executed in a different JVM than it was created in. For this reason, any necessary non-serializable resources must be obtained in the `open()` method and may be released in the `close()` method. The framework guarantees that `open()` will be called before any calls to the `reset`, `hasNext` or `getNext` methods are made, and that `close()` will be called after the enumeration is no longer needed.

The enumeration needs to be re-openable-- that is, after a call to `close()`, a call to `open()` should render the enumeration valid again.

This interface is meant to be used to represent a dynamic, possibly changing set of users. The iteration over this set may proceed in any order and may even change order after a call to the reset() method. The total return set (the unordered set of all usernames returned from the `getNext()` method) may even change after calls to the `reset()` method or if the enumeration has been closed and re-opened. The only requirement is that the enumeration must not return the same username twice unless a call to `reset()` has been made or the enumeration has been closed and re-opened.

Method Summary
`void` | `close()` Releases any resources used by this enumeration.
`String` | `getNext()` Returns the next username in the enumeration.
`boolean` | `hasNext()` Used to determine if more usernames are available from this enumeration.
`void` | `open()` Serves to initialize the enumeration.
`void` | `reset()` Used to reset the enumeration to the beginning.

Method Detail

### open

    void open()
              throws NotificationUserEnumerationException

  Serves to initialize the enumeration. Any resources the enumeration needs may be obtained in this initialization method. This method is called before any calls to the `reset`, `hasNext` or `getNext` methods are made.

  Throws
    `NotificationUserEnumerationException` - if any problems were encountered.

### reset

    void reset()
               throws NotificationUserEnumerationException

  Used to reset the enumeration to the beginning. This may be necessary if a transaction got rolled back and the NotificationManager is attempting to send the notification again.

  It is not necessary that the enumeration proceed in the same order as it did previously, nor that the enumeration results in the same total return set-- in other words, the enumeration can be based entirely on dynamic criteria or data which may change over time. The only requirement is that an enumeration must not return the same username twice unless a call to `reset()` has been made.

  Throws
    `NotificationUserEnumerationException` - if any problems were encountered.

### hasNext

    boolean hasNext()
                    throws NotificationUserEnumerationException

  Used to determine if more usernames are available from this enumeration.

  Returns
    `true` as long as more usernames are available from the enumeration.
  Throws
    `NotificationUserEnumerationException` - if any problems were encountered.

### getNext

    String getNext()
                   throws NotificationUserEnumerationException

  Returns the next username in the enumeration.

  Returns
    the next username in the enumeration.
  Throws
    `NotificationUserEnumerationException` - if any problems were encountered.

### close

    void close()
               throws NotificationUserEnumerationException

  Releases any resources used by this enumeration.

  Throws
    `NotificationUserEnumerationException` - if any problems were encountered.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.