org.openmdx.kernel.naming.spi
Class ClassLoaderContext

java.lang.Object
  extended by org.openmdx.kernel.naming.spi.AbstractContext
      extended by org.openmdx.kernel.naming.spi.NameBasedContext
          extended by org.openmdx.kernel.naming.spi.ClassLoaderContext
All Implemented Interfaces:
Context

public class ClassLoaderContext
extends NameBasedContext

Java URL Context


Field Summary
 
Fields inherited from class org.openmdx.kernel.naming.spi.AbstractContext
environment, nameParser
 
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
 
Constructor Summary
ClassLoaderContext(Hashtable environment, String urlPrefix)
          Constructor
 
Method Summary
 Context createSubcontext(String namespace, String contextName, ClassLoader classLoader)
          Creates a new subcontext for the specified class loader
 String getNameInNamespace()
           
protected  NamingEnumeration listBindings()
          List the bindings
protected  Object resolveLink(String nameComponent)
          Resolve a binding
 
Methods inherited from class org.openmdx.kernel.naming.spi.NameBasedContext
bind, bind, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, rename, rename, resolve, unbind, unbind
 
Methods inherited from class org.openmdx.kernel.naming.spi.AbstractContext
addToEnvironment, close, getEnvironment, removeFromEnvironment, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassLoaderContext

public ClassLoaderContext(Hashtable environment,
                          String urlPrefix)
Constructor

Parameters:
environment -
urlPrefix -
Method Detail

createSubcontext

public Context createSubcontext(String namespace,
                                String contextName,
                                ClassLoader classLoader)
                         throws NamingException
Creates a new subcontext for the specified class loader

Parameters:
namespace -
contextName -
classLoader -
Throws:
NamingException

resolveLink

protected Object resolveLink(String nameComponent)
                      throws NamingException
Description copied from class: NameBasedContext
Resolve a binding

Specified by:
resolveLink in class NameBasedContext
Returns:
the object bound to the given name or null if not found
Throws:
NamingException

listBindings

protected NamingEnumeration listBindings()
                                  throws NamingException
Description copied from class: NameBasedContext
List the bindings

Specified by:
listBindings in class NameBasedContext
Returns:
this context's bindings
Throws:
NamingException

getNameInNamespace

public String getNameInNamespace()
                          throws NamingException
Throws:
NamingException


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.