org.jboss.webbeans.resources.spi.helpers
Class AbstractNamingContext

java.lang.Object
  extended by org.jboss.webbeans.resources.spi.helpers.AbstractNamingContext
All Implemented Interfaces:
NamingContext

public abstract class AbstractNamingContext
extends java.lang.Object
implements NamingContext

Provides common functionality required by a NamingContext

Author:
Pete Muir

Field Summary
 
Fields inherited from interface org.jboss.webbeans.resources.spi.NamingContext
PROPERTY_NAME
 
Constructor Summary
AbstractNamingContext()
           
 
Method Summary
 void bind(java.lang.String key, java.lang.Object value)
          Binds in item to JNDI
abstract  javax.naming.Context getContext()
           
<T> T
lookup(java.lang.String name, java.lang.Class<? extends T> expectedType)
          Lookup an item from JNDI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNamingContext

public AbstractNamingContext()
Method Detail

getContext

public abstract javax.naming.Context getContext()

bind

public void bind(java.lang.String key,
                 java.lang.Object value)
Binds in item to JNDI

Specified by:
bind in interface NamingContext
Parameters:
key - The key to bind under
value - The value to bind

lookup

public <T> T lookup(java.lang.String name,
                    java.lang.Class<? extends T> expectedType)
Lookup an item from JNDI

Specified by:
lookup in interface NamingContext
Type Parameters:
T - The type
Parameters:
name - The key
expectedType - The expected return type
Returns:
The found item


Copyright © 2008-2009. All Rights Reserved.