public class

DnsContextFactory

extends Object
implements InitialContextFactory
java.lang.Object
   ↳ com.sun.jndi.dns.DnsContextFactory

Class Overview

A DnsContextFactory serves as the initial context factory for DNS.

When an initial context is being created, the environment property "java.naming.provider.url" should contain a DNS pseudo-URL (see DnsUrl) or a space-separated list of them. Multiple URLs must all have the same domain value. If the property is not set, the default "dns:" is used.

Summary

Public Constructors
DnsContextFactory()
Public Methods
static DnsContext getContext(String domain, DnsUrl[] urls, Hashtable env)
static DnsContext getContext(String domain, String[] servers, Hashtable<?, ?> env)
Context getInitialContext(Hashtable<?, ?> env)
Creates an Initial Context for beginning name resolution.
static boolean platformServersAvailable()
[Expand]
Inherited Methods
From class java.lang.Object
From interface javax.naming.spi.InitialContextFactory

Public Constructors

public DnsContextFactory ()

Public Methods

public static DnsContext getContext (String domain, DnsUrl[] urls, Hashtable env)

public static DnsContext getContext (String domain, String[] servers, Hashtable<?, ?> env)

public Context getInitialContext (Hashtable<?, ?> env)

Creates an Initial Context for beginning name resolution. Special requirements of this context are supplied using environment.

The environment parameter is owned by the caller. The implementation will not modify the object or keep a reference to it, although it may keep a reference to a clone or copy.

Parameters
env The possibly null environment specifying information to be used in the creation of the initial context.
Returns
  • A non-null initial context object that implements the Context interface.

public static boolean platformServersAvailable ()