Class BindingIteratorImpl
- java.lang.Object
-
- org.omg.PortableServer.Servant
-
- org.omg.CosNaming.BindingIteratorPOA
-
- com.sun.corba.ee.impl.naming.cosnaming.BindingIteratorImpl
-
- All Implemented Interfaces:
InvokeHandler
,BindingIteratorOperations
- Direct Known Subclasses:
TransientBindingIterator
public abstract class BindingIteratorImpl extends BindingIteratorPOA
Class BindingIteratorImpl implements the org.omg.CosNaming::BindingIterator interface, but does not implement the method to retrieve the next binding in the NamingContext for which it was created. This is left to a subclass, which is why this class is abstract; BindingIteratorImpl provides an implementation of the interface operations on top of two subclass methods, allowing multiple implementations of iterators that differ in storage and access to the contents of a NamingContext implementation.The operation next_one() is implemented by the subclass, whereas next_n() is implemented on top of the next_one() implementation. Destroy must also be implemented by the subclass.
A subclass must implement NextOne() and Destroy(); these methods are invoked from synchronized methods and need therefore not be synchronized themselves.
-
-
Constructor Summary
Constructors Constructor Description BindingIteratorImpl(ORB orb)
Create a binding iterator servant.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
destroy()
Destroy this BindingIterator object.protected abstract void
destroyImpl()
Abstract method for destroying this BindingIterator.boolean
list(int how_many, BindingListHolder blh)
lists next n bindings.boolean
next_n(int how_many, BindingListHolder blh)
Return the next n bindings.boolean
next_one(BindingHolder b)
Return the next binding.protected abstract boolean
nextOneImpl(BindingHolder b)
Abstract method for returning the next binding in the NamingContext for which this BindingIterator was created.protected abstract int
remainingElementsImpl()
Abstract method for returning the remaining number of elements.-
Methods inherited from class org.omg.CosNaming.BindingIteratorPOA
_all_interfaces, _invoke, _this, _this
-
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
-
-
-
-
Field Detail
-
orb
protected ORB orb
-
-
Constructor Detail
-
BindingIteratorImpl
public BindingIteratorImpl(ORB orb) throws java.lang.Exception
Create a binding iterator servant. runs the super constructor.- Parameters:
orb
- an ORB object.- Throws:
java.lang.Exception
- a Java exception.
-
-
Method Detail
-
next_one
public boolean next_one(BindingHolder b)
Return the next binding. It also returns true or false, indicating whether there were more bindings.- Parameters:
b
- The Binding as an out parameter.- Returns:
- true if there were more bindings.
- Throws:
SystemException
- One of a fixed set of CORBA system exceptions.- See Also:
nextOneImpl(org.omg.CosNaming.BindingHolder)
-
next_n
public boolean next_n(int how_many, BindingListHolder blh)
Return the next n bindings. It also returns true or false, indicating whether there were more bindings.- Parameters:
how_many
- The number of requested bindings in the BindingList.blh
- The BindingList as an out parameter.- Returns:
- true if there were more bindings.
- Throws:
SystemException
- One of a fixed set of CORBA system exceptions.
-
list
public boolean list(int how_many, BindingListHolder blh)
lists next n bindings. It returns true or false, indicating whether there were more bindings. This method has the package private scope, It will be called from NamingContext.list() operation or this.next_n().- Parameters:
how_many
- The number of requested bindings in the BindingList.blh
- The BindingList as an out parameter.- Returns:
- true if there were more bindings.
-
destroy
public void destroy()
Destroy this BindingIterator object. The object corresponding to this object reference is destroyed.- Throws:
SystemException
- One of a fixed set of CORBA system exceptions.- See Also:
destroyImpl()
-
nextOneImpl
protected abstract boolean nextOneImpl(BindingHolder b)
Abstract method for returning the next binding in the NamingContext for which this BindingIterator was created.- Parameters:
b
- The Binding as an out parameter.- Returns:
- true if there were more bindings.
- Throws:
SystemException
- One of a fixed set of CORBA system exceptions.
-
destroyImpl
protected abstract void destroyImpl()
Abstract method for destroying this BindingIterator.- Throws:
SystemException
- One of a fixed set of CORBA system exceptions.
-
remainingElementsImpl
protected abstract int remainingElementsImpl()
Abstract method for returning the remaining number of elements.- Returns:
- the remaining number of elements in the iterator.
-
-