Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.naming
Class RefAddr  view RefAddr download RefAddr.java

java.lang.Object
  extended byjavax.naming.RefAddr
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BinaryRefAddr, StringRefAddr

public abstract class RefAddr
extends java.lang.Object
implements java.io.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:
1.3

Field Summary
protected  java.lang.String addrType
          The string resprenstation of the type of address.
 
Constructor Summary
protected RefAddr(java.lang.String addrType)
          Protected constructor for use by subclasses.
 
Method Summary
 boolean equals(java.lang.Object o)
          Checks if the object is a RefAddr with the same type and content.
abstract  java.lang.Object getContent()
          Returns the possibly null content of this RefAddr.
 java.lang.String getType()
          Returns the non-null address type given to the constructor.
 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).
 java.lang.String toString()
          Returns a String representation of the RefAddr.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

addrType

protected java.lang.String addrType
The string resprenstation of the type of address. Set by the constructor and returned by the getType() method.

Constructor Detail

RefAddr

protected RefAddr(java.lang.String addrType)
Protected constructor for use by subclasses. Sets the addrType field of this object to the supplied String.

Method Detail

getType

public java.lang.String getType()
Returns the non-null address type given to the constructor.


getContent

public abstract java.lang.Object getContent()
Returns the possibly null content of this RefAddr. The actual value is defined by the non-abstract subclass.


equals

public boolean equals(java.lang.Object o)
Checks if the object is a RefAddr with the same type and content.


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 java.lang.String toString()
Returns a String representation of the RefAddr. Should only be used for debugging purposes.