org.apache.geronimo.naming.reference
Class SimpleReference

java.lang.Object
  extended byjavax.naming.Reference
      extended byorg.apache.geronimo.naming.reference.SimpleReference
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
SimpleAwareReference

public abstract class SimpleReference
extends Reference

Version:
$Rev: 355877 $ $Date: 2005-12-11 03:48:27 +0100 (Sun, 11 Dec 2005) $
See Also:
Serialized Form

Nested Class Summary
static class SimpleReference.SimpleObjectFactory
          Simply calls getContent() on the SimpleReference
 
Field Summary
 
Fields inherited from class javax.naming.Reference
addrs, classFactory, classFactoryLocation, className
 
Constructor Summary
SimpleReference()
           
 
Method Summary
 void add(int posn, RefAddr addr)
           
 void add(RefAddr addr)
           
 void clear()
           
 Object clone()
           
 boolean equals(Object obj)
           
 RefAddr get(int posn)
           
 RefAddr get(String addrType)
           
 Enumeration getAll()
           
 String getClassName()
          We will atleast return an Object.
abstract  Object getContent()
          Gets the actual referenced Object.
 String getFactoryClassLocation()
           
 String getFactoryClassName()
          If the JNDI context does not understand simple references, this method will be called to obtain the class name of a factory.
 int hashCode()
           
 Object remove(int posn)
           
 int size()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleReference

public SimpleReference()
Method Detail

getContent

public abstract Object getContent()
                           throws NamingException
Gets the actual referenced Object.

Returns:
the referenced object
Throws:
NamingException

getClassName

public String getClassName()
We will atleast return an Object. Subclasses may want to provide a more specific class.

Returns:
"java.lang.Object"

getFactoryClassName

public final String getFactoryClassName()
If the JNDI context does not understand simple references, this method will be called to obtain the class name of a factory. This factory in turn understands the simple reference. This style is much slower because JNDI will use reflection to load and create this class.

Returns:

getFactoryClassLocation

public final String getFactoryClassLocation()

get

public final RefAddr get(String addrType)

get

public final RefAddr get(int posn)

getAll

public final Enumeration getAll()

size

public final int size()

add

public final void add(RefAddr addr)

add

public final void add(int posn,
                      RefAddr addr)

remove

public final Object remove(int posn)

clear

public final void clear()

equals

public boolean equals(Object obj)

hashCode

public int hashCode()

toString

public String toString()

clone

public Object clone()


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.