javax.naming
Class RefAddr

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.naming.RefAddr
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Direct Known Subclasses:
BinaryRefAddr sample code for javax.naming.BinaryRefAddr definition code for javax.naming.BinaryRefAddr , StringRefAddr sample code for javax.naming.StringRefAddr definition code for javax.naming.StringRefAddr

public abstract class RefAddr
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Serializable sample code for java.io.Serializable definition code for java.io.Serializable

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.

Since:
1.3
See Also:
Reference sample code for javax.naming.Reference definition code for javax.naming.Reference , LinkRef sample code for javax.naming.LinkRef definition code for javax.naming.LinkRef , StringRefAddr sample code for javax.naming.StringRefAddr definition code for javax.naming.StringRefAddr , BinaryRefAddr sample code for javax.naming.BinaryRefAddr definition code for javax.naming.BinaryRefAddr , Serialized Form

Field Summary
protected  String sample code for java.lang.String definition code for java.lang.String addrType sample code for javax.naming.RefAddr.addrType definition code for javax.naming.RefAddr.addrType
          Contains the type of this address.
 
Constructor Summary
protected RefAddr sample code for javax.naming.RefAddr.RefAddr(java.lang.String) definition code for javax.naming.RefAddr.RefAddr(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  addrType)
          Constructs a new instance of RefAddr using its address type.
 
Method Summary
 boolean equals sample code for javax.naming.RefAddr.equals(java.lang.Object) definition code for javax.naming.RefAddr.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Determines whether obj is equal to this RefAddr.
abstract  Object sample code for java.lang.Object definition code for java.lang.Object getContent sample code for javax.naming.RefAddr.getContent() definition code for javax.naming.RefAddr.getContent() ()
          Retrieves the contents of this address.
 String sample code for java.lang.String definition code for java.lang.String getType sample code for javax.naming.RefAddr.getType() definition code for javax.naming.RefAddr.getType() ()
          Retrieves the address type of this address.
 int hashCode sample code for javax.naming.RefAddr.hashCode() definition code for javax.naming.RefAddr.hashCode() ()
          Computes the hash code of this address using its address type and contents.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.naming.RefAddr.toString() definition code for javax.naming.RefAddr.toString() ()
          Generates the string representation of this address.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

addrType sample code for javax.naming.RefAddr.addrType

protected String sample code for java.lang.String definition code for java.lang.String  addrType
Contains the type of this address.

Constructor Detail

RefAddr sample code for javax.naming.RefAddr(java.lang.String) definition code for javax.naming.RefAddr(java.lang.String)

protected RefAddr(String sample code for java.lang.String definition code for java.lang.String  addrType)
Constructs a new instance of RefAddr using its address type.

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

getType sample code for javax.naming.RefAddr.getType() definition code for javax.naming.RefAddr.getType()

public String sample code for java.lang.String definition code for java.lang.String  getType()
Retrieves the address type of this address.

Returns:
The non-null address type of this address.

getContent sample code for javax.naming.RefAddr.getContent() definition code for javax.naming.RefAddr.getContent()

public abstract Object sample code for java.lang.Object definition code for java.lang.Object  getContent()
Retrieves the contents of this address.

Returns:
The possibly null address contents.

equals sample code for javax.naming.RefAddr.equals(java.lang.Object) definition code for javax.naming.RefAddr.equals(java.lang.Object)

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Determines whether obj is equal to this RefAddr.

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

Overrides:
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) in class Object sample code for java.lang.Object definition code for java.lang.Object
Parameters:
obj - possibly null obj to check.
Returns:
true if obj is equal to this refaddr; false otherwise.
See Also:
getContent() sample code for javax.naming.RefAddr.getContent() definition code for javax.naming.RefAddr.getContent() , getType() sample code for javax.naming.RefAddr.getType() definition code for javax.naming.RefAddr.getType()

hashCode sample code for javax.naming.RefAddr.hashCode() definition code for javax.naming.RefAddr.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.

Overrides:
hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
The hash code of this address as an int.
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode()

toString sample code for javax.naming.RefAddr.toString() definition code for javax.naming.RefAddr.toString()

public String sample code for java.lang.String definition code for java.lang.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.

Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
The non-null string representation of this address.