APIdia Launch Partner
Top Description Fields Constructors Methods
javax.naming

public abstract Class RefAddr

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
javax.naming.StringRefAddr, javax.naming.BinaryRefAddr

This class represents the address of 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.

Authors
Rosanna Lee, Scott Seligman
Since
1.3
See Also
Reference, LinkRef, StringRefAddr, BinaryRefAddr

Field Summary

Modifier and TypeField and Description
protected String
addrType

Contains the type of this address.

private static final long
serialVersionUID

Use serialVersionUID from JNDI 1.1.1 for interoperability

Constructor Summary

AccessConstructor and Description
protected
RefAddr(String
A non-null string describing the type of the address.
addrType
)

Constructs a new instance of RefAddr using its address type.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if obj is equal to this refaddr; false otherwise.
equals
(Object
possibly null obj to check.
obj
)

Overrides java.lang.Object.equals.

Determines whether obj is equal to this RefAddr.

public abstract Object

Returns:

The possibly null address contents.
getContent
()

Retrieves the contents of this address.

public String

Returns:

The non-null address type of this address.
getType
()

Retrieves the address type of this address.

public int

Returns:

The hash code of this address as an int.
hashCode
()

Overrides java.lang.Object.hashCode.

Computes the hash code of this address using its address type and contents.

public String

Returns:

The non-null string representation of this address.
toString
()

Overrides java.lang.Object.toString.

Generates the string representation of this address.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

addrTypeback to summary
protected String addrType

Contains the type of this address.

serialVersionUIDback to summary
private static final long serialVersionUID

Use serialVersionUID from JNDI 1.1.1 for interoperability

Constructor Detail

RefAddrback to summary
protected RefAddr(String addrType)

Constructs a new instance of RefAddr using its address type.

Parameters
addrType:String

A non-null string describing the type of the address.

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Determines whether obj is equal to this RefAddr.

obj is equal to this RefAddr if all of these conditions are true

  • non-null
  • instance of RefAddr
  • obj has the same address type as this RefAddr (using String.compareTo())
  • both obj and this RefAddr's contents are null or they are equal (using the equals() test).
Parameters
obj:Object

possibly null obj to check.

Returns:boolean

true if obj is equal to this refaddr; false otherwise.

See Also
getContent, getType
getContentback to summary
public abstract Object getContent()

Retrieves the contents of this address.

Returns:Object

The possibly null address contents.

getTypeback to summary
public String getType()

Retrieves the address type of this address.

Returns:String

The non-null address type of this address.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.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:int

The hash code of this address as an int.

See Also
java.lang.Object#hashCode
toStringback to summary
public String toString()

Overrides java.lang.Object.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:String

The non-null string representation of this address.