org.picocontainer.gems.jndi
Class JNDIExposed<T>

java.lang.Object
  extended by org.picocontainer.behaviors.AbstractBehavior<T>
      extended by org.picocontainer.behaviors.Stored<T>
          extended by org.picocontainer.gems.jndi.JNDIExposed<T>
All Implemented Interfaces:
Serializable, Behavior<T>, ComponentAdapter<T>, ComponentLifecycle<T>, ComponentMonitorStrategy, LifecycleStrategy

public class JNDIExposed<T>
extends Stored<T>

exposes component to JNDI basically does same thing as cached, but uses JNDI reference instead. Maybe Cached shall be refactored? as there is little new functionality.

Author:
Konstantin Pribluda
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.picocontainer.behaviors.Stored
Stored.Instance<T>
 
Nested classes/interfaces inherited from interface org.picocontainer.ComponentAdapter
ComponentAdapter.NOTHING
 
Field Summary
 
Fields inherited from class org.picocontainer.behaviors.AbstractBehavior
delegate
 
Constructor Summary
JNDIExposed(ComponentAdapter<T> delegate)
          construct reference itself using vanilla initial context.
JNDIExposed(ComponentAdapter<T> delegate, JNDIObjectReference<Stored.Instance<T>> instanceReference)
          create with provided reference
JNDIExposed(ComponentAdapter<T> delegate, String name)
          create adapter with desired name
 
Method Summary
 String toString()
           
 
Methods inherited from class org.picocontainer.behaviors.Stored
componentHasLifecycle, dispose, flush, getComponentInstance, getDescriptor, getLifecycleDescriptor, getStoredObject, isStarted, start, stop
 
Methods inherited from class org.picocontainer.behaviors.AbstractBehavior
accept, changeMonitor, currentMonitor, dispose, findAdapterOfType, getComponentImplementation, getComponentInstance, getComponentKey, getDelegate, hasLifecycle, isLazy, start, stop, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JNDIExposed

public JNDIExposed(ComponentAdapter<T> delegate)
            throws NamingException
construct reference itself using vanilla initial context. JNDI name is stringified component key

Parameters:
delegate - delegate adapter
Throws:
NamingException

JNDIExposed

public JNDIExposed(ComponentAdapter<T> delegate,
                   JNDIObjectReference<Stored.Instance<T>> instanceReference)
create with provided reference

Parameters:
delegate -
instanceReference -

JNDIExposed

public JNDIExposed(ComponentAdapter<T> delegate,
                   String name)
            throws NamingException
create adapter with desired name

Parameters:
delegate -
name -
Throws:
NamingException
Method Detail

toString

public String toString()
Overrides:
toString in class AbstractBehavior<T>


Copyright © 2003-2010 Codehaus. All Rights Reserved.