Interface Resolver
public interface Resolver
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
Modifier and Type | Method | Description |
---|---|---|
ResolveResult |
resolveToClass |
Partially resolves a name. |
ResolveResult |
resolveToClass |
Partially resolves a name. |
Method Details
resolveToClass
ResolveResult resolveToClass(Name name, Class<? extends Context> contextType) throws NamingException
Context
.- Parameters:
-
name
- the name to resolve -
contextType
- the type of object to resolve. This should be a subtype ofContext
. - Returns:
- the object that was found, along with the unresolved suffix of
name
. Cannot be null. - Throws:
-
NotContextException
- if no context of the appropriate type is found -
NamingException
- if a naming exception was encountered - See Also:
resolveToClass
ResolveResult resolveToClass(String name, Class<? extends Context> contextType) throws NamingException
resolveToClass(Name, Class)
for details.- Parameters:
-
name
- the name to resolve -
contextType
- the type of object to resolve. This should be a subtype ofContext
. - Returns:
- the object that was found, along with the unresolved suffix of
name
. Cannot be null. - Throws:
-
NotContextException
- if no context of the appropriate type is found -
NamingException
- if a naming exception was encountered
© 1993, 2021, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/17/docs/api/java.naming/javax/naming/spi/Resolver.html