public class DirContextURLStreamHandler
extends java.net.URLStreamHandler
Modifier and Type | Field and Description |
---|---|
protected javax.naming.directory.DirContext |
context
Directory context.
|
Constructor and Description |
---|
DirContextURLStreamHandler() |
DirContextURLStreamHandler(javax.naming.directory.DirContext context) |
Modifier and Type | Method and Description |
---|---|
static void |
bind(java.lang.ClassLoader cl,
javax.naming.directory.DirContext dirContext)
Binds a directory context to a class loader.
|
static void |
bind(javax.naming.directory.DirContext dirContext)
Binds a directory context to a class loader.
|
static void |
bindThread(javax.naming.directory.DirContext dirContext)
Binds a directory context to a thread.
|
static javax.naming.directory.DirContext |
get()
Get the bound context.
|
static javax.naming.directory.DirContext |
get(java.lang.ClassLoader cl)
Get the bound context.
|
static javax.naming.directory.DirContext |
get(java.lang.Thread thread)
Get the bound context.
|
static boolean |
isBound()
Returns true if the thread or the context class loader of the current
thread is bound.
|
protected java.net.URLConnection |
openConnection(java.net.URL u)
Opens a connection to the object referenced by the
URL
argument. |
static void |
setProtocolHandler()
Set the java.protocol.handler.pkgs system property.
|
protected java.lang.String |
toExternalForm(java.net.URL u)
Override as part of the fix for 36534, to ensure toString is correct.
|
static void |
unbind()
Unbinds a directory context to a class loader.
|
static void |
unbind(java.lang.ClassLoader cl)
Unbinds a directory context to a class loader.
|
static void |
unbindThread()
Unbinds a directory context to a thread.
|
public DirContextURLStreamHandler()
public DirContextURLStreamHandler(javax.naming.directory.DirContext context)
protected java.net.URLConnection openConnection(java.net.URL u) throws java.io.IOException
URL
argument.openConnection
in class java.net.URLStreamHandler
java.io.IOException
protected java.lang.String toExternalForm(java.net.URL u)
toExternalForm
in class java.net.URLStreamHandler
public static void setProtocolHandler()
URLStreamHandlerFactory
.public static boolean isBound()
public static void bind(javax.naming.directory.DirContext dirContext)
public static void unbind()
public static void bindThread(javax.naming.directory.DirContext dirContext)
public static void unbindThread()
public static javax.naming.directory.DirContext get()
public static void bind(java.lang.ClassLoader cl, javax.naming.directory.DirContext dirContext)
public static void unbind(java.lang.ClassLoader cl)
public static javax.naming.directory.DirContext get(java.lang.ClassLoader cl)
public static javax.naming.directory.DirContext get(java.lang.Thread thread)
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.