org.codehaus.spice.jndikit.memory
Class MemoryContext

java.lang.Object
  extended by org.codehaus.spice.jndikit.AbstractContext
      extended by org.codehaus.spice.jndikit.AbstractLocalContext
          extended by org.codehaus.spice.jndikit.memory.MemoryContext
All Implemented Interfaces:
Context

public class MemoryContext
extends AbstractLocalContext

An in memory context implementation.

Version:
$Revision: 1.1 $
Author:
Peter Donald

Field Summary
 
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
  MemoryContext(Namespace namespace, Hashtable environment, Context parent)
           
protected MemoryContext(Namespace namespace, Hashtable environment, Context parent, Hashtable bindings)
           
 
Method Summary
protected  Context cloneContext()
           
protected  void doLocalBind(Name name, Object object)
           
protected  NamingEnumeration doLocalList()
           
protected  NamingEnumeration doLocalListBindings()
           
protected  Object doLocalLookup(Name name)
          Actually lookup raw entry in local context.
protected  void doLocalUnbind(Name name)
          Actually unbind raw entry in local context.
protected  Context newContext()
           
 
Methods inherited from class org.codehaus.spice.jndikit.AbstractLocalContext
bind, checkUnbindContext, close, createSubcontext, destroySubcontext, getNameInNamespace, getNameParser, getNamespace, getParent, isDestroyableContext, list, listBindings, localLookup, lookup, lookupSubContext, unbind
 
Methods inherited from class org.codehaus.spice.jndikit.AbstractContext
addToEnvironment, bind, bind, composeName, composeName, createSubcontext, destroySubcontext, getEnvironment, getLeafName, getNameParser, getNameParser, getPathName, getRawEnvironment, isSelf, list, listBindings, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryContext

protected MemoryContext(Namespace namespace,
                        Hashtable environment,
                        Context parent,
                        Hashtable bindings)

MemoryContext

public MemoryContext(Namespace namespace,
                     Hashtable environment,
                     Context parent)
Method Detail

newContext

protected Context newContext()
                      throws NamingException
Specified by:
newContext in class AbstractLocalContext
Throws:
NamingException

cloneContext

protected Context cloneContext()
                        throws NamingException
Specified by:
cloneContext in class AbstractLocalContext
Throws:
NamingException

doLocalBind

protected void doLocalBind(Name name,
                           Object object)
                    throws NamingException
Specified by:
doLocalBind in class AbstractLocalContext
Throws:
NamingException

doLocalList

protected NamingEnumeration doLocalList()
                                 throws NamingException
Specified by:
doLocalList in class AbstractLocalContext
Throws:
NamingException

doLocalListBindings

protected NamingEnumeration doLocalListBindings()
                                         throws NamingException
Specified by:
doLocalListBindings in class AbstractLocalContext
Throws:
NamingException

doLocalLookup

protected Object doLocalLookup(Name name)
                        throws NamingException
Actually lookup raw entry in local context. When overidding this it is not neccesary to resolve references etc.

Specified by:
doLocalLookup in class AbstractLocalContext
Parameters:
name - the name in local context (size() == 1)
Returns:
the bound object
Throws:
NamingException - if an error occurs

doLocalUnbind

protected void doLocalUnbind(Name name)
                      throws NamingException
Actually unbind raw entry in local context.

Specified by:
doLocalUnbind in class AbstractLocalContext
Parameters:
name - the name in local context (size() == 1)
Throws:
NamingException - if an error occurs


Copyright © 1999-2012 Codehaus. All Rights Reserved.