Rice Pastry API

rice.pastry.socket
Class EpochInetSocketAddress

java.lang.Object
  extended by rice.pastry.socket.EpochInetSocketAddress
All Implemented Interfaces:
java.io.Serializable

public class EpochInetSocketAddress
extends java.lang.Object
implements java.io.Serializable

Class which represets a source route to a remote IP address.

Version:
$Id: EpochInetSocketAddress.java 3463 2006-11-17 15:02:31Z jeffh $
Author:
Alan Mislove
See Also:
Serialized Form

Field Summary
protected  java.net.InetSocketAddress[] address
          DESCRIBE THE FIELD
protected  long epoch
          DESCRIBE THE FIELD
static long EPOCH_UNKNOWN
          DESCRIBE THE FIELD
 
Constructor Summary
EpochInetSocketAddress(java.net.InetSocketAddress address)
          Constructor - don't use this unless you know what you are doing
EpochInetSocketAddress(java.net.InetSocketAddress[] addressList, long epoch)
          Constructor for EpochInetSocketAddress.
EpochInetSocketAddress(java.net.InetSocketAddress address, long epoch)
          Constructor
 
Method Summary
 boolean addressEquals(EpochInetSocketAddress that)
          DESCRIBE THE METHOD
static EpochInetSocketAddress build(InputBuffer buf)
          EpochInetSocketAddress: (IPV4): +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + InetAddress + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + port (int) + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + epoch (long) + + + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 boolean equals(java.lang.Object o)
          Checks equaltiy on source routes
 java.net.InetSocketAddress getAddress(EpochInetSocketAddress local)
          Method which returns the address of this address
 java.net.InetSocketAddress getAddress(java.net.InetAddress[] local)
          Gets the Address attribute of the EpochInetSocketAddress object
 long getEpoch()
          Method which returns the epoch of this address
 java.net.InetSocketAddress getInnermostAddress()
          Gets the InnermostAddress attribute of the EpochInetSocketAddress object
 short getSerializedLength()
          Gets the SerializedLength attribute of the EpochInetSocketAddress object
 int hashCode()
          Returns the hashCode of this source route
 void serialize(OutputBuffer buf)
          EpochInetSocketAddress: (IPV4): +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + InetAddress + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + port (int) + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + epoch (long) + + + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 java.lang.String toString()
          Internal method for computing the toString of an array of InetSocketAddresses
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

address

protected java.net.InetSocketAddress[] address
DESCRIBE THE FIELD


epoch

protected long epoch
DESCRIBE THE FIELD


EPOCH_UNKNOWN

public static final long EPOCH_UNKNOWN
DESCRIBE THE FIELD

See Also:
Constant Field Values
Constructor Detail

EpochInetSocketAddress

public EpochInetSocketAddress(java.net.InetSocketAddress address)
Constructor - don't use this unless you know what you are doing

Parameters:
address - The remote address

EpochInetSocketAddress

public EpochInetSocketAddress(java.net.InetSocketAddress address,
                              long epoch)
Constructor

Parameters:
address - The remote address
epoch - The remote epoch

EpochInetSocketAddress

public EpochInetSocketAddress(java.net.InetSocketAddress[] addressList,
                              long epoch)
Constructor for EpochInetSocketAddress.

Parameters:
addressList - DESCRIBE THE PARAMETER
epoch - DESCRIBE THE PARAMETER
Method Detail

getAddress

public java.net.InetSocketAddress getAddress(EpochInetSocketAddress local)
Method which returns the address of this address

Parameters:
local - DESCRIBE THE PARAMETER
Returns:
The address

getAddress

public java.net.InetSocketAddress getAddress(java.net.InetAddress[] local)
Gets the Address attribute of the EpochInetSocketAddress object

Parameters:
local - DESCRIBE THE PARAMETER
Returns:
The Address value

getInnermostAddress

public java.net.InetSocketAddress getInnermostAddress()
Gets the InnermostAddress attribute of the EpochInetSocketAddress object

Returns:
The InnermostAddress value

getEpoch

public long getEpoch()
Method which returns the epoch of this address

Returns:
The epoch

getSerializedLength

public short getSerializedLength()
Gets the SerializedLength attribute of the EpochInetSocketAddress object

Returns:
The SerializedLength value

hashCode

public int hashCode()
Returns the hashCode of this source route

Overrides:
hashCode in class java.lang.Object
Returns:
The hashCode

equals

public boolean equals(java.lang.Object o)
Checks equaltiy on source routes

Overrides:
equals in class java.lang.Object
Parameters:
o - The source route to compare to
Returns:
The equality

addressEquals

public boolean addressEquals(EpochInetSocketAddress that)
DESCRIBE THE METHOD

Parameters:
that - DESCRIBE THE PARAMETER
Returns:
DESCRIBE THE RETURN VALUE

toString

public java.lang.String toString()
Internal method for computing the toString of an array of InetSocketAddresses

Overrides:
toString in class java.lang.Object
Returns:
THe string

serialize

public void serialize(OutputBuffer buf)
               throws java.io.IOException
EpochInetSocketAddress: (IPV4): +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + InetAddress + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + port (int) + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + epoch (long) + + + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Parameters:
buf -
Throws:
java.io.IOException - DESCRIBE THE EXCEPTION

build

public static EpochInetSocketAddress build(InputBuffer buf)
                                    throws java.io.IOException
EpochInetSocketAddress: (IPV4): +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + InetAddress + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + port (int) + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + epoch (long) + + + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Parameters:
buf -
Returns:
Throws:
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.