APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.jndi.ldap

pack-priv abstract Class AbstractLdapNamingEnumeration<T extends NameClassPair>

extends Object
implements NamingEnumeration<T extends NameClassPair>, ReferralEnumeration<T extends NameClassPair>
Class Inheritance
All Implemented Interfaces
com.sun.jndi.ldap.ReferralEnumeration, javax.naming.NamingEnumeration, java.util.Enumeration
Known Direct Subclasses
com.sun.jndi.ldap.LdapNamingEnumeration, com.sun.jndi.ldap.LdapSearchEnumeration, com.sun.jndi.ldap.LdapBindingEnumeration
Imports
com.sun.jndi.toolkit.ctx.Continuation, java.util.NoSuchElementException, .Vector, javax.naming.*, javax.naming.directory.Attributes, javax.naming.ldap.Control

Basic enumeration for NameClassPair, Binding, and SearchResults.

Field Summary

Modifier and TypeField and Description
private boolean
private Continuation
private Vector<LdapEntry>
private LdapClient
private NamingException
private boolean
protected LdapCtx
private int
protected Name
private boolean
private int
private LdapReferralException
private LdapResult

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
protected final void
public final void
close()

Implements javax.naming.NamingEnumeration.close.

Closes this enumeration.

protected abstract T
createItem(String dn, Attributes attrs, Vector<Control> respCtls)

protected final void
finalize()

Overrides java.lang.Object.finalize.

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

protected final String
private void
protected abstract AbstractLdapNamingEnumeration<? extends NameClassPair>
public final boolean
hasMore()

Implements javax.naming.NamingEnumeration.hasMore.

Determines whether there are any more elements in the enumeration.

public final boolean
hasMoreElements()

Implements java.util.Enumeration.hasMoreElements.

Tests if this enumeration contains more elements.

private boolean
protected final boolean
public final T
next()

Implements javax.naming.NamingEnumeration.next.

Retrieves the next element in the enumeration.

private T
public final T
nextElement()

Implements java.util.Enumeration.nextElement.

Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

private T
pack-priv final void
protected void
Inherited from java.lang.Object:
cloneequalsgetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cleanedback to summary
private boolean cleaned
contback to summary
private Continuation cont
entriesback to summary
private Vector<LdapEntry> entries
enumClntback to summary
private LdapClient enumClnt
errExback to summary
private NamingException errEx
hasMoreCalledback to summary
private boolean hasMoreCalled
homeCtxback to summary
protected LdapCtx homeCtx
limitback to summary
private int limit
listArgback to summary
protected Name listArg
moreback to summary
private boolean more
posnback to summary
private int posn
refExback to summary
private LdapReferralException refEx
resback to summary
private LdapResult res

Constructor Detail

AbstractLdapNamingEnumerationback to summary
pack-priv AbstractLdapNamingEnumeration(LdapCtx homeCtx, LdapResult answer, Name listArg, Continuation cont) throws NamingException

Method Detail

appendUnprocessedReferralsback to summary
public void appendUnprocessedReferrals(LdapReferralException ex)

Implements com.sun.jndi.ldap.ReferralEnumeration.appendUnprocessedReferrals.

Annotations
@Override
cleanupback to summary
protected final void cleanup()
closeback to summary
public final void close()

Implements javax.naming.NamingEnumeration.close.

Doc from javax.naming.NamingEnumeration.close.

Closes this enumeration. After this method has been invoked on this enumeration, the enumeration becomes invalid and subsequent invocation of any of its methods will yield undefined results. This method is intended for aborting an enumeration to free up resources. If an enumeration proceeds to the end--that is, until hasMoreElements() or hasMore() returns false-- resources will be freed up automatically and there is no need to explicitly call close().

This method indicates to the service provider that it is free to release resources associated with the enumeration, and can notify servers to cancel any outstanding requests. The close() method is a hint to implementations for managing their resources. Implementations are encouraged to use appropriate algorithms to manage their resources when client omits the close() calls.

Annotations
@Override
createItemback to summary
protected abstract T createItem(String dn, Attributes attrs, Vector<Control> respCtls) throws NamingException
finalizeback to summary
protected final void finalize()

Overrides java.lang.Object.finalize.

Doc from java.lang.Object.finalize.

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. A subclass overrides the finalize method to dispose of system resources or to perform other cleanup.

When running in a Java virtual machine in which finalization has been disabled or removed, the garbage collector will never call finalize(). In a Java virtual machine in which finalization is enabled, the garbage collector might call finalize only after an indefinite delay.

The general contract of finalize is that it is invoked if and when the Java virtual machine has determined that there is no longer any means by which this object can be accessed by any thread that has not yet died, except as a result of an action taken by the finalization of some other object or class which is ready to be finalized. The finalize method may take any action, including making this object available again to other threads; the usual purpose of finalize, however, is to perform cleanup actions before the object is irrevocably discarded. For example, the finalize method for an object that represents an input/output connection might perform explicit I/O transactions to break the connection before the object is permanently discarded.

The finalize method of class Object performs no special action; it simply returns normally. Subclasses of Object may override this definition.

The Java programming language does not guarantee which thread will invoke the finalize method for any given object. It is guaranteed, however, that the thread that invokes finalize will not be holding any user-visible synchronization locks when finalize is invoked. If an uncaught exception is thrown by the finalize method, the exception is ignored and finalization of that object terminates.

After the finalize method has been invoked for an object, no further action is taken until the Java virtual machine has again determined that there is no longer any means by which this object can be accessed by any thread that has not yet died, including possible actions by other objects or classes which are ready to be finalized, at which point the object may be discarded.

The finalize method is never invoked more than once by a Java virtual machine for any given object.

Any exception thrown by the finalize method causes the finalization of this object to be halted, but is otherwise ignored.

Annotations
@SuppressWarnings:removal
getAtomback to summary
protected final String getAtom(String dn)
getNextBatchback to summary
private void getNextBatch() throws NamingException
getReferredResultsback to summary
protected abstract AbstractLdapNamingEnumeration<? extends NameClassPair> getReferredResults(LdapReferralContext refCtx) throws NamingException
hasMoreback to summary
public final boolean hasMore() throws NamingException

Implements javax.naming.NamingEnumeration.hasMore.

Doc from javax.naming.NamingEnumeration.hasMore.

Determines whether there are any more elements in the enumeration. This method allows naming exceptions encountered while determining whether there are more elements to be caught and handled by the application.

Annotations
@Override
Exceptions
NamingException:
If a naming exception is encountered while attempting to determine whether there is another element in the enumeration. See NamingException and its subclasses for the possible naming exceptions.
hasMoreElementsback to summary
public final boolean hasMoreElements()

Implements java.util.Enumeration.hasMoreElements.

Doc from java.util.Enumeration.hasMoreElements.

Tests if this enumeration contains more elements.

Annotations
@Override
hasMoreImplback to summary
private boolean hasMoreImpl() throws NamingException
hasMoreReferralsback to summary
protected final boolean hasMoreReferrals() throws NamingException
nextback to summary
public final T next() throws NamingException

Implements javax.naming.NamingEnumeration.next.

Doc from javax.naming.NamingEnumeration.next.

Retrieves the next element in the enumeration. This method allows naming exceptions encountered while retrieving the next element to be caught and handled by the application.

Note that next() can also throw the runtime exception NoSuchElementException to indicate that the caller is attempting to enumerate beyond the end of the enumeration. This is different from a NamingException, which indicates that there was a problem in obtaining the next element, for example, due to a referral or server unavailability, etc.

Annotations
@Override
Exceptions
NamingException:
If a naming exception is encountered while attempting to retrieve the next element. See NamingException and its subclasses for the possible naming exceptions.
nextAuxback to summary
private T nextAux() throws NamingException
nextElementback to summary
public final T nextElement()

Implements java.util.Enumeration.nextElement.

Doc from java.util.Enumeration.nextElement.

Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

Annotations
@Override
nextImplback to summary
private T nextImpl() throws NamingException
setNamingExceptionback to summary
pack-priv final void setNamingException(NamingException e)
updateback to summary
protected void update(AbstractLdapNamingEnumeration<? extends NameClassPair> ne)