Class SimpleReference
- java.lang.Object
-
- javax.naming.Reference
-
- org.apache.xbean.naming.reference.SimpleReference
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
CachingReference
public abstract class SimpleReference extends javax.naming.Reference
- Version:
- $Rev: 355877 $ $Date: 2005-12-10 18:48:27 -0800 (Sat, 10 Dec 2005) $
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimpleReference.SimpleObjectFactory
Simply calls getContent() on the SimpleReference
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Enumeration<javax.naming.RefAddr>
EMPTY_ENUMERATION
-
Constructor Summary
Constructors Constructor Description SimpleReference()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
add(int posn, javax.naming.RefAddr addr)
void
add(javax.naming.RefAddr addr)
void
clear()
java.lang.Object
clone()
boolean
equals(java.lang.Object obj)
javax.naming.RefAddr
get(int posn)
javax.naming.RefAddr
get(java.lang.String addrType)
java.util.Enumeration<javax.naming.RefAddr>
getAll()
java.lang.String
getClassName()
We will atleast return an Object.abstract java.lang.Object
getContent()
Gets the actual referenced Object.java.lang.String
getFactoryClassLocation()
java.lang.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()
java.lang.Object
remove(int posn)
int
size()
java.lang.String
toString()
-
-
-
Method Detail
-
getContent
public abstract java.lang.Object getContent() throws javax.naming.NamingException
Gets the actual referenced Object.- Returns:
- the referenced object
- Throws:
javax.naming.NamingException
- on error
-
getClassName
public java.lang.String getClassName()
We will atleast return an Object. Subclasses may want to provide a more specific class.- Overrides:
getClassName
in classjavax.naming.Reference
- Returns:
- "java.lang.Object"
-
getFactoryClassName
public final java.lang.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.- Overrides:
getFactoryClassName
in classjavax.naming.Reference
- Returns:
- factory class name
-
getFactoryClassLocation
public final java.lang.String getFactoryClassLocation()
- Overrides:
getFactoryClassLocation
in classjavax.naming.Reference
-
get
public final javax.naming.RefAddr get(java.lang.String addrType)
- Overrides:
get
in classjavax.naming.Reference
-
get
public final javax.naming.RefAddr get(int posn)
- Overrides:
get
in classjavax.naming.Reference
-
getAll
public final java.util.Enumeration<javax.naming.RefAddr> getAll()
- Overrides:
getAll
in classjavax.naming.Reference
-
size
public final int size()
- Overrides:
size
in classjavax.naming.Reference
-
add
public final void add(javax.naming.RefAddr addr)
- Overrides:
add
in classjavax.naming.Reference
-
add
public final void add(int posn, javax.naming.RefAddr addr)
- Overrides:
add
in classjavax.naming.Reference
-
remove
public final java.lang.Object remove(int posn)
- Overrides:
remove
in classjavax.naming.Reference
-
clear
public final void clear()
- Overrides:
clear
in classjavax.naming.Reference
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjavax.naming.Reference
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjavax.naming.Reference
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjavax.naming.Reference
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjavax.naming.Reference
-
-