javax.naming.spi
Interface Resolver


public interface Resolver

This interface represents an "intermediate context" for name resolution.

The Resolver interface contains methods that are implemented by contexts that do not support subtypes of Context, but which can act as intermediate contexts for resolution purposes.

A Name parameter passed to any method is owned by the caller. The service provider will not modify the object or keep a reference to it. A ResolveResult object returned by any method is owned by the caller. The caller may subsequently modify it; the service provider may not.

Since:
1.3

Method Summary
 ResolveResult sample code for javax.naming.spi.ResolveResult definition code for javax.naming.spi.ResolveResult resolveToClass sample code for javax.naming.spi.Resolver.resolveToClass(javax.naming.Name, java.lang.Class) definition code for javax.naming.spi.Resolver.resolveToClass(javax.naming.Name, java.lang.Class) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name, Class sample code for java.lang.Class definition code for java.lang.Class <? extends Context sample code for javax.naming.Context definition code for javax.naming.Context > contextType)
          Partially resolves a name.
 ResolveResult sample code for javax.naming.spi.ResolveResult definition code for javax.naming.spi.ResolveResult resolveToClass sample code for javax.naming.spi.Resolver.resolveToClass(java.lang.String, java.lang.Class) definition code for javax.naming.spi.Resolver.resolveToClass(java.lang.String, java.lang.Class) (String sample code for java.lang.String definition code for java.lang.String  name, Class sample code for java.lang.Class definition code for java.lang.Class <? extends Context sample code for javax.naming.Context definition code for javax.naming.Context > contextType)
          Partially resolves a name.
 

Method Detail

resolveToClass sample code for javax.naming.spi.Resolver.resolveToClass(javax.naming.Name, java.lang.Class<? extends javax.naming.Context>) definition code for javax.naming.spi.Resolver.resolveToClass(javax.naming.Name, java.lang.Class<? extends javax.naming.Context>)

ResolveResult sample code for javax.naming.spi.ResolveResult definition code for javax.naming.spi.ResolveResult  resolveToClass(Name sample code for javax.naming.Name definition code for javax.naming.Name  name,
                             Class sample code for java.lang.Class definition code for java.lang.Class <? extends Context sample code for javax.naming.Context definition code for javax.naming.Context > contextType)
                             throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Partially resolves a name. Stops at the first context that is an instance of a given subtype of Context.

Parameters:
name - the name to resolve
contextType - the type of object to resolve. This should be a subtype of Context.
Returns:
the object that was found, along with the unresolved suffix of name. Cannot be null.
Throws:
NotContextException sample code for javax.naming.NotContextException definition code for javax.naming.NotContextException - if no context of the appropriate type is found
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception was encountered
See Also:
resolveToClass(String, Class) sample code for javax.naming.spi.Resolver.resolveToClass(java.lang.String, java.lang.Class) definition code for javax.naming.spi.Resolver.resolveToClass(java.lang.String, java.lang.Class)

resolveToClass sample code for javax.naming.spi.Resolver.resolveToClass(java.lang.String, java.lang.Class<? extends javax.naming.Context>) definition code for javax.naming.spi.Resolver.resolveToClass(java.lang.String, java.lang.Class<? extends javax.naming.Context>)

ResolveResult sample code for javax.naming.spi.ResolveResult definition code for javax.naming.spi.ResolveResult  resolveToClass(String sample code for java.lang.String definition code for java.lang.String  name,
                             Class sample code for java.lang.Class definition code for java.lang.Class <? extends Context sample code for javax.naming.Context definition code for javax.naming.Context > contextType)
                             throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Partially resolves a name. See resolveToClass(Name, Class) sample code for javax.naming.spi.Resolver.resolveToClass(javax.naming.Name, java.lang.Class) definition code for javax.naming.spi.Resolver.resolveToClass(javax.naming.Name, java.lang.Class) for details.

Parameters:
name - the name to resolve
contextType - the type of object to resolve. This should be a subtype of Context.
Returns:
the object that was found, along with the unresolved suffix of name. Cannot be null.
Throws:
NotContextException sample code for javax.naming.NotContextException definition code for javax.naming.NotContextException - if no context of the appropriate type is found
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception was encountered