javax.naming
public class Reference extends Object implements Cloneable, Serializable
Field Summary | |
---|---|
protected Vector<RefAddr> | addrs
The list of addresses, stored in this reference. |
protected String | classFactory
The name of the class factory to create an instance of the object,
referenced by this reference. |
protected String | classFactoryLocation
The location, from where the class factory should be loaded. |
protected String | className
The name of the class of the object, to that this reference refers. |
Constructor Summary | |
---|---|
Reference(String className)
Create a new reference that is referencting to the object of the
specified class. | |
Reference(String className, RefAddr addr)
Create a new reference that is referencing to the object of the
specified class with the given address. | |
Reference(String className, String factoryClassName, String factoryLocation)
Create a new reference that is referencing to the object of the
specified class, specifying the class and location of the factory that
produces these objects.
| |
Reference(String className, RefAddr addr, String factoryClassName, String factoryLocation)
Create a new reference that is referencing to the object of the
specified class, specifying the class and location of the factory that
produces these objects and also the address of this object.
|
Method Summary | |
---|---|
void | add(int posn, RefAddr addr)
Add the new address for this object at the given position of the
address list. |
void | add(RefAddr addr)
Appends the new object address to the end of the address list. |
void | clear()
Removes all defined addresses of the object. |
Object | clone() |
boolean | equals(Object obj)
Compares two addresses for equality, by value. |
RefAddr | get(int posn)
Get the address of this object at the given position. |
RefAddr | get(String addrType)
Get the given type of address for this object.
|
Enumeration<RefAddr> | getAll()
Get the enumeration over all defined addresses of the object. |
String | getClassName()
Get the name of the class of the referenced object.
|
String | getFactoryClassLocation()
Get the location of the factory class of the referenced object.
|
String | getFactoryClassName()
Get the name of the factory class of the referenced object
|
int | hashCode()
Get the hashcode of this reference.
|
Object | remove(int posn)
Remove the address at the given position.
|
int | size()
Return the number of the defined addresses. |
String | toString()
Return the string representation. |
Parameters: className the object class name factoryClassName the object factory class name factoryLocation the object factory location
Parameters: className the object class name addr the address of the object factoryClassName the object factory class name factoryLocation the object factory location
Parameters: addrType the needed type of address
Returns: the address of this object, having the specified type. If there is no address of such type, null is returned.
See Also: className
See Also: classFactoryLocation
See Also: classFactory
Returns: the sum of the hash codes of the addresses.
Parameters: posn the position of the address to remove
Returns: the removed address