org.ow2.jonas.lib.naming
Class SingletonComponentContextFactory

java.lang.Object
  extended by org.ow2.jonas.lib.naming.SingletonComponentContextFactory
All Implemented Interfaces:
JComponentContextFactory

public final class SingletonComponentContextFactory
extends Object
implements JComponentContextFactory

Allow to create the context (java:) used in JOnAS application server.

Author:
Guillaume Sauthier

Method Summary
 void addDelegate(JComponentContextFactoryDelegate extension)
          Add the given JComponentContextFactoryDelegate to this NamingManager instance.
 Context createComponentContext(String id)
          Create Context for component environments.
static JComponentContextFactory getInstance()
          Return the unique instance of a JComponentContextFactory.
 void removeDelegate(JComponentContextFactoryDelegate extension)
          Remove the given JComponentContextFactoryDelegate from this NamingManager instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static JComponentContextFactory getInstance()
                                            throws NamingException
Return the unique instance of a JComponentContextFactory.

Returns:
a JComponentContextFactory the unique instance.
Throws:
NamingException - if it failed.

addDelegate

public void addDelegate(JComponentContextFactoryDelegate extension)
                 throws NamingException
Add the given JComponentContextFactoryDelegate to this NamingManager instance.

Specified by:
addDelegate in interface JComponentContextFactory
Parameters:
extension - Added delegate
Throws:
NamingException - if delegate is not added

removeDelegate

public void removeDelegate(JComponentContextFactoryDelegate extension)
                    throws NamingException
Remove the given JComponentContextFactoryDelegate from this NamingManager instance.

Specified by:
removeDelegate in interface JComponentContextFactory
Parameters:
extension - Removed delegate
Throws:
NamingException - if delegate is not removed

createComponentContext

public Context createComponentContext(String id)
                               throws NamingException
Create Context for component environments. The returned context is a Java EE Component Context.

Specified by:
createComponentContext in interface JComponentContextFactory
Parameters:
id - the Context ID.
Returns:
Naming Context for component environment
Throws:
NamingException - If exception encountered when creating namespace.


Copyright © 2010 OW2 Consortium. All Rights Reserved.