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
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroy this BindingIterator object.protected abstract void
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
Return the next binding.protected abstract boolean
Abstract method for returning the next binding in the NamingContext for which this BindingIterator was created.protected abstract int
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 Details
-
orb
-
-
Constructor Details
-
BindingIteratorImpl
Create a binding iterator servant. runs the super constructor.- Parameters:
orb
- an ORB object.- Throws:
Exception
- a Java exception.
-
-
Method Details
-
next_one
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:
-
next_n
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
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:
-
nextOneImpl
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.
-