47 import java.util.Hashtable;
48 import java.util.Enumeration;
49
50 /**
51 * Class TransientBindingIterator implements the abstract methods
52 * defined by BindingIteratorImpl, to use with the TransientNamingContext
53 * implementation of the NamingContextImpl. The TransientBindingIterator
54 * implementation receives a hash table of InternalBindingValues, and uses
55 * an Enumeration to iterate over the contents of the hash table.
56 * @see BindingIteratorImpl
57 * @see TransientNamingContext
58 */
59 public class PersistentBindingIterator extends BindingIteratorImpl
60 {
61 private POA biPOA;
62 /**
63 * Constructs a new PersistentBindingIterator object.
64 * @param orb a org.omg.CORBA.ORB object.
65 * @param aTable A hashtable containing InternalBindingValues which is
66 * the content of the PersistentNamingContext.
67 * @param java.lang.Exception a Java exception.
68 * @exception Exception a Java exception thrown of the base class cannot
69 * initialize.
70 */
71 public PersistentBindingIterator(org.omg.CORBA.ORB orb, Hashtable aTable,
72 POA thePOA ) throws java.lang.Exception
73 {
74 super(orb);
75 this.orb = orb;
76 theHashtable = aTable;
77 theEnumeration = this.theHashtable.keys();
78 currentSize = this.theHashtable.size();
79 biPOA = thePOA;
80 }
81
82 /**
83 * Returns the next binding in the NamingContext. Uses the enumeration
84 * object to determine if there are more bindings and if so, returns
85 * the next binding from the InternalBindingValue.
86 * @param b The Binding as an out parameter.
87 * @return true if there were more bindings.
|
47 import java.util.Hashtable;
48 import java.util.Enumeration;
49
50 /**
51 * Class TransientBindingIterator implements the abstract methods
52 * defined by BindingIteratorImpl, to use with the TransientNamingContext
53 * implementation of the NamingContextImpl. The TransientBindingIterator
54 * implementation receives a hash table of InternalBindingValues, and uses
55 * an Enumeration to iterate over the contents of the hash table.
56 * @see BindingIteratorImpl
57 * @see TransientNamingContext
58 */
59 public class PersistentBindingIterator extends BindingIteratorImpl
60 {
61 private POA biPOA;
62 /**
63 * Constructs a new PersistentBindingIterator object.
64 * @param orb a org.omg.CORBA.ORB object.
65 * @param aTable A hashtable containing InternalBindingValues which is
66 * the content of the PersistentNamingContext.
67 * @exception Exception a Java exception thrown of the base class cannot
68 * initialize.
69 */
70 public PersistentBindingIterator(org.omg.CORBA.ORB orb, Hashtable aTable,
71 POA thePOA ) throws java.lang.Exception
72 {
73 super(orb);
74 this.orb = orb;
75 theHashtable = aTable;
76 theEnumeration = this.theHashtable.keys();
77 currentSize = this.theHashtable.size();
78 biPOA = thePOA;
79 }
80
81 /**
82 * Returns the next binding in the NamingContext. Uses the enumeration
83 * object to determine if there are more bindings and if so, returns
84 * the next binding from the InternalBindingValue.
85 * @param b The Binding as an out parameter.
86 * @return true if there were more bindings.
|