ObjrefEnumerationpublic final class ObjrefEnumeration extends Object implements Serializable, EnumerationThis class is necessary because neither Vector nor Hashtable
return a Serializable Enumeration, which can be sent from the
EJB server back to the client.
This class must be available at the client too, and it could
be instantiated in another vendor's container. |
Fields Summary |
---|
private int | count | private ArrayList | objrefs |
Methods Summary |
---|
public void | add(java.lang.Object obj)
// This is called only by the EJB container in the RI.
if ( objrefs == null )
objrefs = new ArrayList();
objrefs.add(obj);
| public boolean | hasMoreElements()
if ( objrefs == null )
return false;
return count < objrefs.size();
| public java.lang.Object | nextElement()
if ( objrefs != null ) {
synchronized (this) {
if (count < objrefs.size()) {
return objrefs.get(count++);
}
}
}
throw new NoSuchElementException("ObjrefEnumeration");
|
|