Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
javax.naming

Class RefAddr

java.lang.Object
|
+--javax.naming.RefAddr

All Implemented Interfaces:

Serializable


public abstract class RefAddr

extends Object

implements Serializable

Abstract superclass of addresses used in References. A Reference object contains a Vector of RefAddrs which are used to reference/address the object. This abstract superclass keeps track of the type of address, which will be returned by getType(). And defines a abstract method getContent() which must be implemented in concrete subclasses such as BinaryRefAddr and StringRefAddr.

Since:Authors:See Also:

Field Summary

java.lang.StringaddrType

The string resprenstation of the type of address.

Constructor Summary

RefAddr(java.lang.String addrType)

Protected constructor for use by subclasses.

Method Summary

booleanequals(java.lang.Object o)

Checks if the object is a RefAddr with the same type and content.
java.lang.ObjectgetContent()

Returns the possibly null content of this RefAddr.
java.lang.StringgetType()

Returns the non-null address type given to the constructor.
inthashCode()

Returns the hashCode which is the hasCode of the String returned by getType() plus the hashCode of the Object returned by getContent (when not null).
java.lang.StringtoString()

Returns a String representation of the RefAddr.

Field Details

addrType

protected String addrType

The string resprenstation of the type of address. Set by the constructor and returned by the getType() method.


Constructor Details

RefAddr

protected RefAddr(java.lang.String addrType)

Protected constructor for use by subclasses. Sets the addrType field of this object to the supplied String.

Parameters:

Throws:


Method Details

equals

public boolean equals(java.lang.Object o)

Checks if the object is a RefAddr with the same type and content.

Parameters:

Returns:


getContent

public Object getContent()

Returns the possibly null content of this RefAddr. The actual value is defined by the non-abstract subclass.


getType

public String getType()

Returns the non-null address type given to the constructor.


hashCode

public int hashCode()

Returns the hashCode which is the hasCode of the String returned by getType() plus the hashCode of the Object returned by getContent (when not null).


toString

public String toString()

Returns a String representation of the RefAddr. Should only be used for debugging purposes.