Book Home Java Enterprise in a Nutshell Search this book

Chapter 22. The javax.naming Package

The javax.naming package contains the core interfaces, classes, and exceptions for performing naming operations with JNDI. Context represents named objects in a naming system, while InitialContext provides an entry point into a naming system. Binding is the association between a name and an object in a naming system. NamingException is the root of a large collection of naming exceptions defined by JNDI. Figure 22-1 shows the classes and interfaces of the javax.naming package, while Figure 22-2 shows the exception hierarchy.

figure

Figure 22-1. The classes and interfaces of the javax.naming package

figure

Figure 22-2. The exception hierarchy of the javax.naming package

AuthenticationExceptionJNDI 1.1
javax.namingserializable checked

Thrown when JNDI encounters an error authenticating to the naming system, such as when a bad username or password is used.

public class AuthenticationException extends NamingSecurityException {
// Public Constructors
public AuthenticationException ();
public AuthenticationException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->NamingSecurityException-->AuthenticationException

AuthenticationNotSupportedExceptionJNDI 1.1
javax.namingserializable checked

Thrown when the requested type of authentication is not supported.

public class AuthenticationNotSupportedException extends NamingSecurityException {
// Public Constructors
public AuthenticationNotSupportedException ();
public AuthenticationNotSupportedException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->NamingSecurityException-->AuthenticationNotSupportedException

BinaryRefAddrJNDI 1.1
javax.namingserializable

A concrete subclass of RefAddr that provides a binary representation of a communications endpoint, such as an IP address.

public class BinaryRefAddr extends RefAddr {
// Public Constructors
public BinaryRefAddr (String addrType, byte[ ] src);
public BinaryRefAddr (String addrType, byte[ ] src, int offset, int count);
// Public methods overriding RefAddr
public boolean equals (Object obj);
public Object getContent ();
public int hashCode ();
public String toString ();
}

Hierarchy: Object-->RefAddr(Serializable)-->BinaryRefAddr

BindingJNDI 1.1
javax.namingserializable

This class represents the association between a name and an object. The listBindings() method of Context returns a NamingEnumeration of Binding objects.

public class Binding extends NameClassPair {
// Public Constructors
public Binding (String name, Object obj);
public Binding (String name, String className, Object obj);
public Binding (String name, Object obj, boolean isRelative);
public Binding (String name, String className, Object obj, boolean isRelative);
// Public Instance Methods
public Object getObject ();
public void setObject (Object obj);
// Public methods overriding NameClassPair
public String getClassName ();
public String toString ();
}

Hierarchy: Object-->NameClassPair(Serializable)-->javax.naming.Binding

Subclasses: javax.naming.directory.SearchResult

CannotProceedExceptionJNDI 1.1
javax.namingserializable checked

Thrown when a service provider cannot further resolve a name, such as when a component of a name resides in another service provider.

public class CannotProceedException extends NamingException {
// Public Constructors
public CannotProceedException ();
public CannotProceedException (String explanation);
// Public Instance Methods
public Name getAltName (); default:null
public javax.naming.Context getAltNameCtx (); default:null
public java.util.Hashtable getEnvironment (); default:null
public Name getRemainingNewName (); default:null
public void setAltName (Name altName);
public void setAltNameCtx (javax.naming.Context altNameCtx);
public void setEnvironment (java.util.Hashtable environment);
public void setRemainingNewName (Name newName);
// Protected Instance Fields
protected Name altName ;
protected javax.naming.Context altNameCtx ;
protected java.util.Hashtable environment ;
protected Name remainingNewName ;
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->CannotProceedException

Passed To: javax.naming.spi.DirectoryManager.getContinuationDirContext(), javax.naming.spi.NamingManager.getContinuationContext()

CommunicationExceptionJNDI 1.1
javax.namingserializable checked

Thrown when a JNDI method is unable to communicate with the naming service for some reason.

public class CommunicationException extends NamingException {
// Public Constructors
public CommunicationException ();
public CommunicationException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->CommunicationException

CompositeNameJNDI 1.1
javax.namingcloneable serializable

This class represents a sequence of names that span multiple namespaces. Each component of a CompositeName is a String name. The CompositeName does not know to which naming system each name component belongs. JNDI uses the forward slash character ("/") to separate constituent name components.

public class CompositeName implements Name {
// Public Constructors
public CompositeName ();
public CompositeName (String n) throws InvalidNameException;
// Protected Constructors
protected CompositeName (java.util.Enumeration comps);
// Methods implementing Name
public Name add (String comp) throws InvalidNameException;
public Name add (int posn, String comp) throws InvalidNameException;
public Name addAll (Name suffix) throws InvalidNameException;
public Name addAll (int posn, Name n) throws InvalidNameException;
public Object clone ();
public int compareTo (Object obj);
public boolean endsWith (Name n);
public String get (int posn);
public java.util.Enumeration getAll ();
public Name getPrefix (int posn);
public Name getSuffix (int posn);
public boolean isEmpty (); default:true
public Object remove (int posn) throws InvalidNameException;
public int size ();
public boolean startsWith (Name n);
// Public methods overriding Object
public boolean equals (Object obj);
public int hashCode ();
public String toString ();
}

Hierarchy: Object-->CompositeName(Name(Cloneable,Serializable))

CompoundNameJNDI 1.1
javax.namingcloneable serializable

This class represents a name that is made up of atomic names from a single name space.

public class CompoundName implements Name {
// Public Constructors
public CompoundName (String n, java.util.Properties syntax) throws InvalidNameException;
// Protected Constructors
protected CompoundName (java.util.Enumeration comps, java.util.Properties syntax);
// Methods implementing Name
public Name add (String comp) throws InvalidNameException;
public Name add (int posn, String comp) throws InvalidNameException;
public Name addAll (Name suffix) throws InvalidNameException;
public Name addAll (int posn, Name n) throws InvalidNameException;
public Object clone ();
public int compareTo (Object obj);
public boolean endsWith (Name n);
public String get (int posn);
public java.util.Enumeration getAll ();
public Name getPrefix (int posn);
public Name getSuffix (int posn);
public boolean isEmpty ();
public Object remove (int posn) throws InvalidNameException;
public int size ();
public boolean startsWith (Name n);
// Public methods overriding Object
public boolean equals (Object obj);
public int hashCode ();
public String toString ();
// Protected Instance Fields
protected transient NameImpl impl ;
protected transient java.util.Properties mySyntax ;
}

Hierarchy: Object-->CompoundName(Name(Cloneable,Serializable))

ConfigurationExceptionJNDI 1.1
javax.namingserializable checked

Thrown when JNDI has experienced a configuration problem, such as a missing environment property or a misconfigured security protocol.

public class ConfigurationException extends NamingException {
// Public Constructors
public ConfigurationException ();
public ConfigurationException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->ConfigurationException

ContextJNDI 1.1
javax.naming

This interface represents an object in a naming system. A Context keeps track of a set of name-to-object bindings for its subordinates in the naming system, so it defines methods to examine and update these bindings. The lookup() method looks up a subordinate object, while list() and listBindings() provide access to all of the subordinates.

A Context only knows about its subordinates, not about itself or what is above it in the naming system. Thus, there are no methods to get the name of a Context or move up in the naming hierarchy.

public abstract interface Context {
// Public Constants
public static final String AUTHORITATIVE ;="java.naming.authoritative"
public static final String BATCHSIZE ;="java.naming.batchsize"
public static final String DNS_URL ;="java.naming.dns.url"
public static final String INITIAL_CONTEXT_FACTORY ;="java.naming.factory.initial"
public static final String LANGUAGE ;="java.naming.language"
public static final String OBJECT_FACTORIES ;="java.naming.factory.object"
public static final String PROVIDER_URL ;="java.naming.provider.url"
public static final String REFERRAL ;="java.naming.referral"
public static final String SECURITY_AUTHENTICATION ;="java.naming.security.authentication"
public static final String SECURITY_CREDENTIALS ;="java.naming.security.credentials"
public static final String SECURITY_PRINCIPAL ;="java.naming.security.principal"
public static final String SECURITY_PROTOCOL ;="java.naming.security.protocol"
public static final String URL_PKG_PREFIXES ;="java.naming.factory.url.pkgs"
// Public Instance Methods
public abstract Object addToEnvironment (String propName, Object propVal) throws NamingException;
public abstract void bind (Name name, Object obj) throws NamingException;
public abstract void bind (String name, Object obj) throws NamingException;
public abstract void close () throws NamingException;
public abstract Name composeName (Name name, Name prefix) throws NamingException;
public abstract String composeName (String name, String prefix) throws NamingException;
public abstract javax.naming.Context createSubcontext (Name name) throws NamingException;
public abstract javax.naming.Context createSubcontext (String name) throws NamingException;
public abstract void destroySubcontext (Name name) throws NamingException;
public abstract void destroySubcontext (String name) throws NamingException;
public abstract java.util.Hashtable getEnvironment () throws NamingException;
public abstract NameParser getNameParser (Name name) throws NamingException;
public abstract NameParser getNameParser (String name) throws NamingException;
public abstract NamingEnumeration list (Name name) throws NamingException;
public abstract NamingEnumeration list (String name) throws NamingException;
public abstract NamingEnumeration listBindings (Name name) throws NamingException;
public abstract NamingEnumeration listBindings (String name) throws NamingException;
public abstract Object lookup (Name name) throws NamingException;
public abstract Object lookup (String name) throws NamingException;
public abstract Object lookupLink (Name name) throws NamingException;
public abstract Object lookupLink (String name) throws NamingException;
public abstract void rebind (Name name, Object obj) throws NamingException;
public abstract void rebind (String name, Object obj) throws NamingException;
public abstract Object removeFromEnvironment (String propName) throws NamingException;
public abstract void rename (Name oldName, Name newName) throws NamingException;
public abstract void rename (String oldName, String newName) throws NamingException;
public abstract void unbind (Name name) throws NamingException;
public abstract void unbind (String name) throws NamingException;
}

Implementations: InitialContext, javax.naming.directory.DirContext

Passed To: CannotProceedException.setAltNameCtx(), javax.naming.spi.NamingManager.getObjectInstance(), javax.naming.spi.ObjectFactory.getObjectInstance()

Returned By: CannotProceedException.getAltNameCtx(), javax.naming.Context.createSubcontext(), InitialContext.{createSubcontext(), getDefaultInitCtx(), getURLOrDefaultInitCtx()}, ReferralException.getReferralContext(), javax.naming.spi.InitialContextFactory.getInitialContext(), javax.naming.spi.NamingManager.{getContinuationContext(), getInitialContext(), getURLContext()}

Type Of: CannotProceedException.altNameCtx, InitialContext.defaultInitCtx

ContextNotEmptyExceptionJNDI 1.1
javax.namingserializable checked

Thrown when the destroySubcontext() method is called to destroy a Context that is not empty.

public class ContextNotEmptyException extends NamingException {
// Public Constructors
public ContextNotEmptyException ();
public ContextNotEmptyException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->ContextNotEmptyException

InitialContextJNDI 1.1
javax.naming

This class represents the starting point for accessing a naming system. Typically, you set the value of the java.naming.factory.initial property (represented by the constant Context.INITIAL_CONTEXT_FACTORY) to the fully qualified package name of a factory class in a JNDI service provider. This factory class creates an InitialContext that is appropriate for the naming system you are using.

public class InitialContext implements javax.naming.Context {
// Public Constructors
public InitialContext () throws NamingException;
public InitialContext (java.util.Hashtable environment) throws NamingException;
// Methods implementing Context
public Object addToEnvironment (String propName, Object propVal) throws NamingException;
public void bind (String name, Object obj) throws NamingException;
public void bind (Name name, Object obj) throws NamingException;
public void close () throws NamingException;
public String composeName (String name, String prefix) throws NamingException;
public Name composeName (Name name, Name prefix) throws NamingException;
public javax.naming.Context createSubcontext (String name) throws NamingException;
public javax.naming.Context createSubcontext (Name name) throws NamingException;
public void destroySubcontext (Name name) throws NamingException;
public void destroySubcontext (String name) throws NamingException;
public java.util.Hashtable getEnvironment () throws NamingException;
public NameParser getNameParser (String name) throws NamingException;
public NameParser getNameParser (Name name) throws NamingException;
public NamingEnumeration list (Name name) throws NamingException;
public NamingEnumeration list (String name) throws NamingException;
public NamingEnumeration listBindings (Name name) throws NamingException;
public NamingEnumeration listBindings (String name) throws NamingException;
public Object lookup (Name name) throws NamingException;
public Object lookup (String name) throws NamingException;
public Object lookupLink (Name name) throws NamingException;
public Object lookupLink (String name) throws NamingException;
public void rebind (Name name, Object obj) throws NamingException;
public void rebind (String name, Object obj) throws NamingException;
public Object removeFromEnvironment (String propName) throws NamingException;
public void rename (Name oldName, Name newName) throws NamingException;
public void rename (String oldName, String newName) throws NamingException;
public void unbind (Name name) throws NamingException;
public void unbind (String name) throws NamingException;
// Protected Instance Methods
protected javax.naming.Context getDefaultInitCtx () throws NamingException;
protected javax.naming.Context getURLOrDefaultInitCtx (Name name) throws NamingException;
protected javax.naming.Context getURLOrDefaultInitCtx (String name) throws NamingException;
// Protected Instance Fields
protected javax.naming.Context defaultInitCtx ;
protected boolean gotDefault ;
protected java.util.Hashtable myProps ;
}

Hierarchy: Object-->InitialContext(javax.naming.Context)

Subclasses: javax.naming.directory.InitialDirContext

InsufficientResourcesExceptionJNDI 1.1
javax.namingserializable checked

Thrown when there are insufficient system resources, such as memory or disk space, to perform an operation.

public class InsufficientResourcesException extends NamingException {
// Public Constructors
public InsufficientResourcesException ();
public InsufficientResourcesException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->InsufficientResourcesException

InterruptedNamingExceptionJNDI 1.1
javax.namingserializable checked

Thrown when a naming operation has been interrupted.

public class InterruptedNamingException extends NamingException {
// Public Constructors
public InterruptedNamingException ();
public InterruptedNamingException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->InterruptedNamingException

InvalidNameExceptionJNDI 1.1
javax.namingserializable checked

Thrown when a specified name violates the syntax of a particular naming system.

public class InvalidNameException extends NamingException {
// Public Constructors
public InvalidNameException ();
public InvalidNameException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->InvalidNameException

Thrown By: CompositeName.{add(), addAll(), CompositeName(), remove()}, CompoundName.{add(), addAll(), CompoundName(), remove()}, Name.{add(), addAll(), remove()}

LimitExceededExceptionJNDI 1.1
javax.namingserializable checked

Thrown when a method fails because it has exceeded a user- or system-specified limit.

public class LimitExceededException extends NamingException {
// Public Constructors
public LimitExceededException ();
public LimitExceededException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->LimitExceededException

Subclasses: SizeLimitExceededException, TimeLimitExceededException

LinkExceptionJNDI 1.1
javax.namingserializable checked

Thrown when a method cannot resolve a link.

public class LinkException extends NamingException {
// Public Constructors
public LinkException ();
public LinkException (String explanation);
// Public Instance Methods
public String getLinkExplanation (); default:null
public Name getLinkRemainingName (); default:null
public Name getLinkResolvedName (); default:null
public Object getLinkResolvedObj (); default:null
public void setLinkExplanation (String msg);
public void setLinkRemainingName (Name name);
public void setLinkResolvedName (Name name);
public void setLinkResolvedObj (Object obj);
// Public methods overriding NamingException
public String toString ();
public String toString (boolean detail);
// Protected Instance Fields
protected String linkExplanation ;
protected Name linkRemainingName ;
protected Name linkResolvedName ;
protected Object linkResolvedObj ;
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->LinkException

Subclasses: LinkLoopException, MalformedLinkException

LinkLoopExceptionJNDI 1.1
javax.namingserializable checked

Thrown when a loop is detected when resolving a link or when JNDI has reached a limit on link counts.

public class LinkLoopException extends LinkException {
// Public Constructors
public LinkLoopException ();
public LinkLoopException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->LinkException-->LinkLoopException

LinkRefJNDI 1.1
javax.namingcloneable serializable

LinkRef is a subclass of Reference that contains a name, called the link name, that is bound to an atomic name in a context.

public class LinkRef extends javax.naming.Reference {
// Public Constructors
public LinkRef (String linkName);
public LinkRef (Name linkName);
// Public Instance Methods
public String getLinkName () throws NamingException;
}

Hierarchy: Object-->javax.naming.Reference(Cloneable,Serializable)-->LinkRef

MalformedLinkExceptionJNDI 1.1
javax.namingserializable checked

Thrown when a link name is improperly constructed.

public class MalformedLinkException extends LinkException {
// Public Constructors
public MalformedLinkException ();
public MalformedLinkException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->LinkException-->MalformedLinkException

NameJNDI 1.1
javax.namingcloneable serializable

This interface represents the name of an object in a naming system. A Name can be either a compound name or a composite name. This interface is used primarily by developers who are writing JNDI service providers, not by JNDI application developers. As an application developer, you can use String objects instead of Name objects to specify names in Context and javax.naming.directory.DirContext method calls.

public abstract interface Name extends Cloneable, Serializable {
// Public Instance Methods
public abstract Name add (String comp) throws InvalidNameException;
public abstract Name add (int posn, String comp) throws InvalidNameException;
public abstract Name addAll (Name suffix) throws InvalidNameException;
public abstract Name addAll (int posn, Name n) throws InvalidNameException;
public abstract Object clone ();
public abstract int compareTo (Object obj);
public abstract boolean endsWith (Name n);
public abstract String get (int posn);
public abstract java.util.Enumeration getAll ();
public abstract Name getPrefix (int posn);
public abstract Name getSuffix (int posn);
public abstract boolean isEmpty ();
public abstract Object remove (int posn) throws InvalidNameException;
public abstract int size ();
public abstract boolean startsWith (Name n);
}

Hierarchy: (Name(Cloneable,Serializable))

Implementations: CompositeName, CompoundName

Passed To: Too many methods to list.

Returned By: Too many methods to list.

Type Of: CannotProceedException.{altName, remainingNewName}, LinkException.{linkRemainingName, linkResolvedName}, NamingException.{remainingName, resolvedName}, javax.naming.spi.ResolveResult.remainingName

NameAlreadyBoundExceptionJNDI 1.1
javax.namingserializable checked

Thrown when a binding operation fails because the name is already bound.

public class NameAlreadyBoundException extends NamingException {
// Public Constructors
public NameAlreadyBoundException ();
public NameAlreadyBoundException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->NameAlreadyBoundException

NameClassPairJNDI 1.1
javax.namingserializable

This class represents the name and class of an object bound to a Context. The list() method of Context returns an NamingEnumeration of NameClassPair objects. Note that NameClassPair does not represent the object itself; that is the job of its subclass Binding.

public class NameClassPair implements Serializable {
// Public Constructors
public NameClassPair (String name, String className);
public NameClassPair (String name, String className, boolean isRelative);
// Public Instance Methods
public String getClassName ();
public String getName ();
public boolean isRelative ();
public void setClassName (String name);
public void setName (String name);
public void setRelative (boolean r);
// Public methods overriding Object
public String toString ();
}

Hierarchy: Object-->NameClassPair(Serializable)

Subclasses: javax.naming.Binding

NameNotFoundExceptionJNDI 1.1
javax.namingserializable checked

Thrown when a component of a name cannot be resolved because it is not bound.

public class NameNotFoundException extends NamingException {
// Public Constructors
public NameNotFoundException ();
public NameNotFoundException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->NameNotFoundException

NameParserJNDI 1.1
javax.naming

This interface is for parsing names from a hierarchical namespace. A NameParser knows the syntactic information, such as left-to-right orientation and the name separator, needed to parse names.

public abstract interface NameParser {
// Public Instance Methods
public abstract Name parse (String name) throws NamingException;
}

Returned By: javax.naming.Context.getNameParser(), InitialContext.getNameParser()

NamingEnumerationJNDI 1.1
javax.naming

This interface represents a list of items returned from a JNDI operation. It extends java.util.Enumeration, so a NamingEnumeration can be treated as a normal enumeration.

public abstract interface NamingEnumeration extends java.util.Enumeration {
// Public Instance Methods
public abstract boolean hasMore () throws NamingException;
public abstract Object next () throws NamingException;
}

Hierarchy: (NamingEnumeration(java.util.Enumeration))

Returned By: Too many methods to list.

NamingExceptionJNDI 1.1
javax.namingserializable checked

The base class of all exceptions thrown by Context and javax.naming.directory.DirContext methods. NamingException can include information about where the operation failed, such as the portion of a name that has been resolved and the portion that remains to be resolved. A NamingException can also include a root cause exception, which is the exception object that caused the naming exception to be thrown.

public class NamingException extends Exception {
// Public Constructors
public NamingException ();
public NamingException (String explanation);
// Public Instance Methods
public void appendRemainingComponent (String name);
public void appendRemainingName (Name name);
public String getExplanation (); default:null
public Name getRemainingName (); default:null
public Name getResolvedName (); default:null
public Object getResolvedObj (); default:null
public Throwable getRootCause (); default:null
public void setRemainingName (Name name);
public void setResolvedName (Name name);
public void setResolvedObj (Object obj);
public void setRootCause (Throwable e);
public String toString (boolean detail);
// Public methods overriding Throwable
public String toString ();
// Protected Instance Fields
protected Name remainingName ;
protected Name resolvedName ;
protected Object resolvedObj ;
protected Throwable rootException ;
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException

Subclasses: Too many classes to list.

Thrown By: Too many methods to list.

NamingSecurityExceptionJNDI 1.1
javax.namingserializable checked

The abstract superclass of all security-related naming exceptions.

public abstract class NamingSecurityException extends NamingException {
// Public Constructors
public NamingSecurityException ();
public NamingSecurityException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->NamingSecurityException

Subclasses: AuthenticationException, AuthenticationNotSupportedException, NoPermissionException

NoInitialContextExceptionJNDI 1.1
javax.namingserializable checked

Thrown when JNDI cannot create an initial context.

public class NoInitialContextException extends NamingException {
// Public Constructors
public NoInitialContextException ();
public NoInitialContextException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->NoInitialContextException

NoPermissionExceptionJNDI 1.1
javax.namingserializable checked

Thrown when there is an attempt to perform an operation that is forbidden by the underlying naming system due to insufficient privileges.

public class NoPermissionException extends NamingSecurityException {
// Public Constructors
public NoPermissionException ();
public NoPermissionException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->NamingSecurityException-->NoPermissionException

NotContextExceptionJNDI 1.1
javax.namingserializable checked

Thrown when there is an attempt to perform a Context-related operation on an object that is not a Context.

public class NotContextException extends NamingException {
// Public Constructors
public NotContextException ();
public NotContextException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->NotContextException

OperationNotSupportedExceptionJNDI 1.1
javax.namingserializable checked

Thrown when the provider's implementation of Context does not support a method that has been invoked (e.g., trying to list the subordinates of a leaf object like a print job that by definition cannot have any children).

public class OperationNotSupportedException extends NamingException {
// Public Constructors
public OperationNotSupportedException ();
public OperationNotSupportedException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->OperationNotSupportedException

PartialResultExceptionJNDI 1.1
javax.namingserializable checked

Thrown when an operation cannot be completed and has returned only a partial result (e.g., returning only a partial list of subordinates).

public class PartialResultException extends NamingException {
// Public Constructors
public PartialResultException ();
public PartialResultException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->PartialResultException

RefAddrJNDI 1.1
javax.namingserializable

This abstract class represents the address of a communications end point. It is used by Reference to represent the communication mechanism and address of a reference. Concrete implementations support addresses such as URLs, DNS names, and IP addresses.

public abstract class RefAddr implements Serializable {
// Protected Constructors
protected RefAddr (String addrType);
// Public Instance Methods
public abstract Object getContent ();
public String getType ();
// Public methods overriding Object
public boolean equals (Object obj);
public int hashCode ();
public String toString ();
// Protected Instance Fields
protected String addrType ;
}

Hierarchy: Object-->RefAddr(Serializable)

Subclasses: BinaryRefAddr, StringRefAddr

Passed To: javax.naming.Reference.{add(), Reference()}

Returned By: javax.naming.Reference.get()

ReferenceJNDI 1.1
javax.namingcloneable serializable

This class represents an object external to a naming system that is referred to by an object in the naming system. A Reference contains an address for retrieving the object from its naming system. The address is a communications end point that enables JNDI to contact the object. The address can be any concrete subclass of RefAddr, such as a StringRefAddr for representing a URL or DNS name. A Reference also contains the class name of the referenced object.

public class Reference implements Cloneable, Serializable {
// Public Constructors
public Reference (String className);
public Reference (String className, RefAddr addr);
public Reference (String className, String factory, String factoryLocation);
public Reference (String className, RefAddr addr, String factory, String factoryLocation);
// Public Instance Methods
public void add (RefAddr addr);
public void add (int posn, RefAddr addr);
public void clear ();
public RefAddr get (String addrType);
public RefAddr get (int posn);
public java.util.Enumeration getAll ();
public String getClassName ();
public String getFactoryClassLocation ();
public String getFactoryClassName ();
public Object remove (int posn);
public int size ();
// Public methods overriding Object
public Object clone ();
public boolean equals (Object obj);
public int hashCode ();
public String toString ();
// Protected Instance Fields
protected java.util.Vector addrs ;
protected String classFactory ;
protected String classFactoryLocation ;
protected String className ;
}

Hierarchy: Object-->javax.naming.Reference(Cloneable,Serializable)

Subclasses: LinkRef

Returned By: Referenceable.getReference()

ReferenceableJNDI 1.1
javax.naming

This interface is implemented by an object that can provide a reference to itself in the form of a Reference object.

public abstract interface Referenceable {
// Public Instance Methods
public abstract javax.naming.Reference getReference () throws NamingException;
}
ReferralExceptionJNDI 1.1
javax.namingserializable checked

Thrown when a referral cannot be continued, such as when more information is required. Note that this is an abstract class.

public abstract class ReferralException extends NamingException {
// Protected Constructors
protected ReferralException ();
protected ReferralException (String explanation);
// Public Instance Methods
public abstract javax.naming.Context getReferralContext () throws NamingException;
public abstract Object getReferralInfo ();
public abstract boolean skipReferral ();
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->ReferralException

ServiceUnavailableExceptionJNDI 1.1
javax.namingserializable checked

Thrown when the name service is not available for some reason.

public class ServiceUnavailableException extends NamingException {
// Public Constructors
public ServiceUnavailableException ();
public ServiceUnavailableException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->ServiceUnavailableException

SizeLimitExceededExceptionJNDI 1.1
javax.namingserializable checked

Thrown when a method produces a result that exceeds a size limit.

public class SizeLimitExceededException extends LimitExceededException {
// Public Constructors
public SizeLimitExceededException ();
public SizeLimitExceededException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->LimitExceededException-->SizeLimitExceededException

StringRefAddrJNDI 1.1
javax.namingserializable

A concrete subclass of RefAddr that provides a string form of the address of a communications end point.

public class StringRefAddr extends RefAddr {
// Public Constructors
public StringRefAddr (String addrType, String addr);
// Public methods overriding RefAddr
public Object getContent ();
}

Hierarchy: Object-->RefAddr(Serializable)-->StringRefAddr

TimeLimitExceededExceptionJNDI 1.1
javax.namingserializable checked

Thrown when a method does not finish within a certain time limit.

public class TimeLimitExceededException extends LimitExceededException {
// Public Constructors
public TimeLimitExceededException ();
public TimeLimitExceededException (String explanation);
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->NamingException-->LimitExceededException-->TimeLimitExceededException



Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.

This HTML Help has been published using the chm2web software.