org.oddjob.arooa.registry
Class Address

java.lang.Object
  extended by org.oddjob.arooa.registry.Address
All Implemented Interfaces:
Serializable

public class Address
extends Object
implements Serializable

A address uniquely identifies a component by its server and path.

See Also:
Serialized Form

Constructor Summary
Address(Path path)
          Create a local address.
Address(ServerId serverId, Path path)
          Create an address of an object on a server.
 
Method Summary
static String arrayAsString(Address[] addresses)
          Utility function for debugs.
 boolean equals(Object obj)
           
 Path getPath()
          Get the path.
 ServerId getServerId()
          Get the ServerId.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Address

public Address(Path path)
Create a local address.

Parameters:
path - The path to the component.

Address

public Address(ServerId serverId,
               Path path)
Create an address of an object on a server.

Parameters:
serverId - The server id.
path - The path.
Method Detail

getPath

public Path getPath()
Get the path.

Returns:
The path.

getServerId

public ServerId getServerId()
Get the ServerId.

Returns:
The ServerId.

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

arrayAsString

public static String arrayAsString(Address[] addresses)
Utility function for debugs.

Parameters:
addresses - Array of address.
Returns:
A string.