All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javax.naming.RefAddr

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

public abstract class RefAddr
extends Object
implements Serializable
The RefAddr class represents a communications end-point. It consists of a type that describes the communication mechanism and an address contents determined by an RefAddr subclass.

For example, an address type could be "BSD Printer Address", which specifies that it is an address to be used with the BSD printing protocol. Its contents could be the machine name identifying the location of the printer server that understands this protocol.

A RefAddr is contained within a Reference.

RefAddr is an abstract class. Concrete implementations of it determine its synchronization properties.

The serialized form of a RefAddr object consists of only its type name String.

See Also:
Reference, LinkRef, StringRefAddr, BinaryRefAddr

Variable Index

 o addrType

Constructor Index

 o RefAddr(String)
Constructs a new instance of RefAddr using its address type.

Method Index

 o equals(Object)
Determines whether obj is equal to this RefAddr.
 o getContent()
Retrieves the contents of this address.
 o getType()
Retrieves the address type of this address.
 o hashCode()
Computes the hash code of this address using its address type and contents.
 o toString()
Generates the string representation of this address.

Variables

 o addrType
 protected String addrType

Constructors

 o RefAddr
 protected RefAddr(String addrType)
Constructs a new instance of RefAddr using its address type.

Parameters:
addrType - A non-null string describing the type of the address.

Methods

 o getType
 public String getType()
Retrieves the address type of this address.

Returns:
The non-null address type of this address.
 o getContent
 public abstract Object getContent()
Retrieves the contents of this address.

Returns:
The possibly null address contents.
 o equals
 public boolean equals(Object obj)
Determines whether obj is equal to this RefAddr. obj is equal to this RefAddr all of these conditions are true

Parameters:
obj - possibly null obj to check.
Returns:
true if obj is equal to this refaddr; false otherwise.
Overrides:
equals in class Object
See Also:
getContent, getType
 o hashCode
 public int hashCode()
Computes the hash code of this address using its address type and contents. The hash code is the sum of the hash code of the address type and the hash code of the address contents.

Returns:
The hash code of this address as an int.
Overrides:
hashCode in class Object
See Also:
hashCode
 o toString
 public String toString()
Generates the string representation of this address. The string consists of the address's type and contents with labels. This representation is intended for display only and not to be parsed.

Returns:
The non-null string representation of this address.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index