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

java.lang.Object
  extended by org.picocontainer.gems.jndi.JNDIObjectReference<T>
All Implemented Interfaces:
Serializable, ObjectReference<T>

public class JNDIObjectReference<T>
extends Object
implements ObjectReference<T>, Serializable

object reference to store and retrieve objects from JNDI

Author:
ko5tik
See Also:
Serialized Form

Constructor Summary
JNDIObjectReference(String jndiName)
           
JNDIObjectReference(String name, Context ctx)
           
 
Method Summary
 T get()
          retrieve object from JNDI if possible
 String getName()
          name of this reference
 void set(T item)
          store object in JNDI under specified name
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JNDIObjectReference

public JNDIObjectReference(String name,
                           Context ctx)

JNDIObjectReference

public JNDIObjectReference(String jndiName)
                    throws NamingException
Throws:
NamingException
Method Detail

get

public T get()
retrieve object from JNDI if possible

Specified by:
get in interface ObjectReference<T>

set

public void set(T item)
store object in JNDI under specified name

Specified by:
set in interface ObjectReference<T>

getName

public String getName()
name of this reference

Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003-2010 Codehaus. All Rights Reserved.