Package cronapi.osjava.sj.jndi
Class ContextBindings
- java.lang.Object
-
- cronapi.osjava.sj.jndi.ContextBindings
-
- All Implemented Interfaces:
Enumeration,NamingEnumeration
- Direct Known Subclasses:
ContextNames
public class ContextBindings extends Object implements NamingEnumeration
This class represents a NamingEnumeration of the bindings of a Context. Originally authored by Henri Yandell and modified to make more flexable with other Context implementations.- Version:
- $Rev: 1983 $ $Date: 2005-09-03 07:03:38 -0700 (Sat, 03 Sep 2005) $
- Author:
- Robert M. Zigweid and Henri Yandell
-
-
Constructor Summary
Constructors Constructor Description ContextBindings(Map table)Creates a ContextBindings object based upon an a Map of names and the objects the names are bound to.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the ContextBindings instance, rendering it inoperable.booleanhasMore()Returnstrueif there are more elements available, otherwisefalse.booleanhasMoreElements()Returnstrueif there are more elements available, otherwisefalse.Objectnext()Returns aBindingcreated from the next available name.ObjectnextElement()Returns aBindingcreated from the next available name.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Enumeration
asIterator
-
-
-
-
Constructor Detail
-
ContextBindings
public ContextBindings(Map table)
Creates a ContextBindings object based upon an a Map of names and the objects the names are bound to. Iftableis modified after instantiation of ContextBindings, behavior is undefined and should be considered invalid.- Parameters:
table- The table upon which the ContextBindings is based.
-
-
Method Detail
-
hasMoreElements
public boolean hasMoreElements()
Returnstrueif there are more elements available, otherwisefalse.- Specified by:
hasMoreElementsin interfaceEnumeration- Returns:
trueif there are more elements available, otherwisefalse
-
hasMore
public boolean hasMore() throws NamingExceptionReturnstrueif there are more elements available, otherwisefalse.- Specified by:
hasMorein interfaceNamingEnumeration- Returns:
trueif there are more elements available, otherwisefalse- Throws:
NamingException- if a naming exception is encountered
-
nextElement
public Object nextElement()
Returns aBindingcreated from the next available name.- Specified by:
nextElementin interfaceEnumeration- Returns:
- a Binding representing the binding of the name and the object bound to the name
-
next
public Object next() throws NamingException
Returns aBindingcreated from the next available name.- Specified by:
nextin interfaceNamingEnumeration- Returns:
- a Binding representing the binding of the name and the object bound to the name
- Throws:
NamingException- if a naming exception occurs
-
close
public void close()
Close the ContextBindings instance, rendering it inoperable.- Specified by:
closein interfaceNamingEnumeration
-
-