com.sun.jndi.ldap.obj
Class GroupOfURLs.Members

java.lang.Object
  extended by com.sun.jndi.ldap.obj.GroupOfURLs.Members
All Implemented Interfaces:
java.util.Enumeration, javax.naming.NamingEnumeration
Enclosing class:
GroupOfURLs

 class GroupOfURLs.Members
extends java.lang.Object
implements javax.naming.NamingEnumeration

The members of a dynamic group.


Field Summary
private  boolean expandSubgroups
           
private  java.lang.String filter
           
private  javax.naming.NamingEnumeration memberUrls
           
private  javax.naming.NamingEnumeration results
           
private  javax.naming.directory.SearchControls searchControls
           
private  javax.naming.NamingEnumeration subgroupMembers
           
private  java.util.ArrayList subgroups
           
 
Constructor Summary
GroupOfURLs.Members()
           
GroupOfURLs.Members(javax.naming.NamingEnumeration memberUrls, java.lang.String filter, javax.naming.directory.SearchControls searchControls)
           
 
Method Summary
 void close()
          Closes the enumeration and releases its resources.
 boolean hasMore()
          Check if the group has more members.
 boolean hasMoreElements()
          Check if the group has more members.
 java.lang.Object next()
          Retrieve the next member of the group.
 java.lang.Object nextElement()
          Retrieve the next member of the group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

memberUrls

private javax.naming.NamingEnumeration memberUrls

filter

private java.lang.String filter

searchControls

private javax.naming.directory.SearchControls searchControls

results

private javax.naming.NamingEnumeration results

expandSubgroups

private boolean expandSubgroups

subgroups

private java.util.ArrayList subgroups

subgroupMembers

private javax.naming.NamingEnumeration subgroupMembers
Constructor Detail

GroupOfURLs.Members

GroupOfURLs.Members()

GroupOfURLs.Members

GroupOfURLs.Members(javax.naming.NamingEnumeration memberUrls,
                    java.lang.String filter,
                    javax.naming.directory.SearchControls searchControls)
Method Detail

hasMoreElements

public boolean hasMoreElements()
Check if the group has more members.

Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
true if the group has another member.

hasMore

public boolean hasMore()
                throws javax.naming.NamingException
Check if the group has more members.

Specified by:
hasMore in interface javax.naming.NamingEnumeration
Returns:
true if the group has another member.
Throws:
javax.naming.NamingException - If a problem is encountered while checking whether the group has any more members.

nextElement

public java.lang.Object nextElement()
Retrieve the next member of the group. Some members may themselves be groups. Such a member is returned as an object of class Group.

Specified by:
nextElement in interface java.util.Enumeration
Returns:
The next member of the group. When only the LdapGroupFactory object factory is active then an object of class Principal or Group is returned. However, when additional object factories are active then an object of a different class may be returned.
Throws:
java.util.NoSuchElementException - If no more members exist or if a NamingException was encountered while retrieving the next element.

next

public java.lang.Object next()
                      throws javax.naming.NamingException
Retrieve the next member of the group. Some members may themselves be groups. Such a member is returned as an object of class Group.

Specified by:
next in interface javax.naming.NamingEnumeration
Returns:
The next member of the group. When only the LdapGroupFactory object factory is active then an object of class Principal or Group is returned. However, when additional object factories are active then an object of a different class may be returned.
Throws:
javax.naming.NamingException - If a problem is encountered while retrieving the next member of the group.
java.util.NoSuchElementException - if no more members exist or if a NamingException was encountered while retrieving the next element.

close

public void close()
           throws javax.naming.NamingException
Closes the enumeration and releases its resources.

Specified by:
close in interface javax.naming.NamingEnumeration
Throws:
javax.naming.NamingException - If a problem is encountered while closing the enumeration.