Resolver (Java SE 11 & JDK 11 ) (original) (raw)
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
All Methods Instance Methods Abstract Methods
Modifier and Type Method Description ResolveResult resolveToClass(String name,Class<? extends Context> contextType) Partially resolves a name. ResolveResult resolveToClass(Name name,Class<? extends Context> contextType) Partially resolves a name. Method Detail
* #### resolveToClass [ResolveResult](ResolveResult.html "class in javax.naming.spi") resolveToClass([Name](../Name.html "interface in javax.naming") name, [Class](../../../../java.base/java/lang/Class.html "class in java.lang")<? extends [Context](../Context.html "interface in javax.naming")> contextType) throws [NamingException](../NamingException.html "class in javax.naming") 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](../NotContextException.html "class in javax.naming")` \- if no context of the appropriate type is found `[NamingException](../NamingException.html "class in javax.naming")` \- if a naming exception was encountered See Also: [resolveToClass(String, Class)](#resolveToClass%28java.lang.String,java.lang.Class%29) * #### resolveToClass [ResolveResult](ResolveResult.html "class in javax.naming.spi") resolveToClass([String](../../../../java.base/java/lang/String.html "class in java.lang") name, [Class](../../../../java.base/java/lang/Class.html "class in java.lang")<? extends [Context](../Context.html "interface in javax.naming")> contextType) throws [NamingException](../NamingException.html "class in javax.naming") Partially resolves a name. See [resolveToClass(Name, Class)](#resolveToClass%28javax.naming.Name,java.lang.Class%29) 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](../NotContextException.html "class in javax.naming")` \- if no context of the appropriate type is found `[NamingException](../NamingException.html "class in javax.naming")` \- if a naming exception was encountered
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.