Interface GroupMemberIterator
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
@NotExtensible @ThreadSafety(level=INTERFACE_NOT_THREADSAFE) public interface GroupMemberIterator extends java.io.Closeable
This interface defines a set of methods that may be used to iterate through the members of a group. Theclose()
method should be called if the caller wants to stop iterating before reaching the end of the set of members.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes this iterator and indicates that the server may clean up any resources associated with it.DN
nextMemberDN()
Retrieves the DN of the entry for the next group member.Entry
nextMemberEntry()
Retrieves the entry for the next group member.
-
-
-
Method Detail
-
nextMemberDN
DN nextMemberDN() throws GroupMemberIteratorException
Retrieves the DN of the entry for the next group member. This method will not necessarily ensure that the DN refers to an entry that exists.- Returns:
- The DN of the next group member, or
null
if there are no more members. - Throws:
GroupMemberIteratorException
- If a problem is encountered while attempting to retrieve the DN for the next member. TheGroupMemberIteratorException.mayContinueIterating()
method should be used to determine whether the problem is with the next member and it is safe to continue using this iterator, or whether the iterator itself is no longer valid.
-
nextMemberEntry
Entry nextMemberEntry() throws GroupMemberIteratorException
Retrieves the entry for the next group member.- Returns:
- The entry for the next group member, or
null
if there are no more members. - Throws:
GroupMemberIteratorException
- If a problem is encountered while attempting to retrieve the entry for the next member. TheGroupMemberIteratorException.mayContinueIterating()
method should be used to determine whether the problem is with the next member and it is safe to continue using this iterator, or whether the iterator itself is no longer valid.
-
close
void close()
Closes this iterator and indicates that the server may clean up any resources associated with it. This method must be used if the caller wishes to stop iterating through the list of members before the end has been reached. It may also be called after reaching the end of the member list with no ill effects, but that is not necessary. It may also be called multiple times for the same iterator with no ill effects.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-