FileDocCategorySizeDatePackage
ASIterator.javaAPI DocGlassfish v2 API2955Fri May 04 22:35:54 BST 2007com.sun.enterprise.server.ss.util

ASIterator

public class ASIterator extends Object implements Iterator
When nio application uses Selector.selectedKeys(), ASSelector will return a ASSet instance, where it will wrap those selection keys used for OP_ACCEPT. Nio application might use Set.iterator() to remove the processed SelectionKey from the selectedSet. We provide a wrapper Iterator so that even the actual selectedSet in the Selector is modified.
see
ASSelector

Fields Summary
Iterator
it
ASSet
asSet
Constructors Summary
public ASIterator(ASSet asSet)


       
        this.it = asSet.actualSet().iterator();
        this.asSet = asSet;
    
Methods Summary
public booleanhasNext()

        return it.hasNext();
    
public java.lang.Objectnext()

        return asSet.wrapIfNecessary(it.next());
    
public voidremove()

        it.remove();