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

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

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

An implementation of NamingContext which forwards all its method calls to another NamingContext}. Subclasses should override one or more methods to modify the behavior of the backing NamingContext as desired per the decorator pattern.

Author:
Pete Muir

Field Summary
 
Fields inherited from interface org.jboss.webbeans.resources.spi.NamingContext
PROPERTY_NAME
 
Constructor Summary
ForwardingNamingContext()
           
 
Method Summary
 void bind(java.lang.String key, java.lang.Object value)
          Binds an item to JNDI
protected abstract  NamingContext delegate()
           
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
<T> T
lookup(java.lang.String name, java.lang.Class<? extends T> expectedType)
          Typed JNDI lookup
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForwardingNamingContext

public ForwardingNamingContext()
Method Detail

delegate

protected abstract NamingContext delegate()

bind

public void bind(java.lang.String key,
                 java.lang.Object value)
Description copied from interface: NamingContext
Binds an item to JNDI

Specified by:
bind in interface NamingContext
value - The item to bind

lookup

public <T> T lookup(java.lang.String name,
                    java.lang.Class<? extends T> expectedType)
Description copied from interface: NamingContext
Typed JNDI lookup

Specified by:
lookup in interface NamingContext
Type Parameters:
T - The type
Parameters:
name - The JNDI name
expectedType - The expected type
Returns:
The object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2008-2009. All Rights Reserved.