APIdia Launch Partner
Top Description Methods
javax.naming.spi

public Interface Resolver

Known Direct Implementers
com.sun.jndi.toolkit.ctx.PartialCompositeContext, javax.naming.spi.ContinuationContext
Imports
javax.naming.Context, .Name, .NamingException

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.

Authors
Rosanna Lee, Scott Seligman
Since
1.3

Method Summary

Modifier and TypeMethod and Description
public ResolveResult

Returns:

the object that was found, along with the unresolved suffix of name. Cannot be null.
resolveToClass
(Name
the name to resolve
name
,
Class<? extends Context>
the type of object to resolve. This should be a subtype of Context.
contextType
)

Partially resolves a name.

public ResolveResult

Returns:

the object that was found, along with the unresolved suffix of name. Cannot be null.
resolveToClass
(String
the name to resolve
name
,
Class<? extends Context>
the type of object to resolve. This should be a subtype of Context.
contextType
)

Partially resolves a name.

Method Detail

resolveToClassback to summary
public ResolveResult resolveToClass(Name name, Class<? extends Context> contextType) throws NamingException

Partially resolves a name. Stops at the first context that is an instance of a given subtype of Context.

Parameters
name:Name

the name to resolve

contextType:Class<? extends Context>

the type of object to resolve. This should be a subtype of Context.

Returns:ResolveResult

the object that was found, along with the unresolved suffix of name. Cannot be null.

Exceptions
NamingException:
if a naming exception was encountered
NotContextException:
if no context of the appropriate type is found
See Also
resolveToClass(String, Class)
resolveToClassback to summary
public ResolveResult resolveToClass(String name, Class<? extends Context> contextType) throws NamingException

Partially resolves a name. See resolveToClass(Name, Class) for details.

Parameters
name:String

the name to resolve

contextType:Class<? extends Context>

the type of object to resolve. This should be a subtype of Context.

Returns:ResolveResult

the object that was found, along with the unresolved suffix of name. Cannot be null.

Exceptions
NamingException:
if a naming exception was encountered
NotContextException:
if no context of the appropriate type is found