org.apache.geronimo.gjndi
Class KernelContextGBean

java.lang.Object
  extended by org.apache.xbean.naming.context.AbstractContext
      extended by org.apache.xbean.naming.context.AbstractFederatedContext
          extended by org.apache.xbean.naming.context.WritableContext
              extended by org.apache.geronimo.gjndi.KernelContextGBean
All Implemented Interfaces:
Serializable, Context, org.apache.geronimo.gbean.GBeanLifecycle, org.apache.xbean.naming.context.NestedContextFactory
Direct Known Subclasses:
GlobalContextGBean

public class KernelContextGBean
extends org.apache.xbean.naming.context.WritableContext
implements org.apache.geronimo.gbean.GBeanLifecycle

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.xbean.naming.context.WritableContext
org.apache.xbean.naming.context.WritableContext.NestedWritableContext
 
Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
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
KernelContextGBean(String nameInNamespace, org.apache.geronimo.gbean.AbstractNameQuery abstractNameQuery, org.apache.geronimo.kernel.Kernel kernel)
           
 
Method Summary
protected  void addBinding(org.apache.geronimo.gbean.AbstractName abstractName)
          Binds the specified gbean.
protected  Name createBindingName(org.apache.geronimo.gbean.AbstractName abstractName, Object value)
          Create a name under which we will bind the specified gbean with the specified value.
protected  Map createBindings(org.apache.geronimo.gbean.AbstractName abstractName, Object value)
           
 void doFail()
           
 void doStart()
           
 void doStop()
           
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
protected  Object preprocessVaue(org.apache.geronimo.gbean.AbstractName abstractName, Name name, Object value)
          Preprocess the value before it is bound.
protected  void removeBinding(org.apache.geronimo.gbean.AbstractName abstractName)
          Unbinds the specified gbean.
 
Methods inherited from class org.apache.xbean.naming.context.WritableContext
addBinding, addBinding, createNestedSubcontext, getDeepBinding, getWrapperBindings, removeBinding
 
Methods inherited from class org.apache.xbean.naming.context.AbstractFederatedContext
addFederatedContext, faultLookup, getBindings, getMasterContext, isNestedSubcontext
 
Methods inherited from class org.apache.xbean.naming.context.AbstractContext
addBinding, addDeepBinding, addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, createSubcontextTree, destroySubcontext, destroySubcontext, getBinding, getContextAccess, getEnvironment, getNameInNamespace, getNameInNamespace, getNameInNamespace, getNameParser, getNameParser, getNameParser, getParsedNameInNamespace, getSize, isEmpty, list, list, list, listBindings, listBindings, listBindings, lookup, lookup, lookup, lookupFinalContext, lookupLink, lookupLink, rebind, rebind, removeDeepBinding, removeDeepBinding, removeFromEnvironment, rename, rename, unbind, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

KernelContextGBean

public KernelContextGBean(String nameInNamespace,
                          org.apache.geronimo.gbean.AbstractNameQuery abstractNameQuery,
                          org.apache.geronimo.kernel.Kernel kernel)
                   throws NamingException
Throws:
NamingException
Method Detail

doStart

public void doStart()
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle

doStop

public void doStop()
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

addBinding

protected void addBinding(org.apache.geronimo.gbean.AbstractName abstractName)
                   throws NamingException
Binds the specified gbean. This method uses createBindingName and preprocessValue before binding the object.

Parameters:
abstractName - the abstract name of the gbean to bind
Throws:
NamingException - if an error occurs during binding

removeBinding

protected void removeBinding(org.apache.geronimo.gbean.AbstractName abstractName)
Unbinds the specified gbean.

Parameters:
abstractName - the abstract name of the gbean to unbind

createBindings

protected Map createBindings(org.apache.geronimo.gbean.AbstractName abstractName,
                             Object value)
                      throws NamingException
Throws:
NamingException

createBindingName

protected Name createBindingName(org.apache.geronimo.gbean.AbstractName abstractName,
                                 Object value)
                          throws NamingException
Create a name under which we will bind the specified gbean with the specified value. By default, this method simply returns the "name" element of the abstract name

Parameters:
abstractName - the abstract name of the gbean to bind
value - the gbean instance
Returns:
the name under which the gbean should be bound
Throws:
NamingException

preprocessVaue

protected Object preprocessVaue(org.apache.geronimo.gbean.AbstractName abstractName,
                                Name name,
                                Object value)
                         throws NamingException
Preprocess the value before it is bound. This is usefult for wrapping values with reference objects. By default, this method simply return the value.

Parameters:
abstractName - the abstract name of the gbean to bind
name - the name under which the gbean will be bound
value - the gbean instance
Returns:
the value to bind
Throws:
NamingException

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


Copyright © 2006 Apache Software Foundation. All Rights Reserved.