net.i2p.router.transport.udp
Class RemoteHostId

java.lang.Object
  extended by net.i2p.router.transport.udp.RemoteHostId

final class RemoteHostId
extends java.lang.Object

Unique ID for a peer - its IP + port, all bundled into a tidy obj. If the remote peer is not reachabe through an IP+port, this contains the hash of their identity.


Constructor Summary
RemoteHostId(byte[] peerHash)
           
RemoteHostId(byte[] ip, int port)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 byte[] getIP()
           
 byte[] getPeerHash()
           
 int getPort()
           
 int hashCode()
           
 java.lang.String toHostString()
           
 java.lang.String toString()
           
 java.lang.String toString(boolean includePort)
           
static java.lang.String toString(byte[] ip)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteHostId

public RemoteHostId(byte[] ip,
                    int port)

RemoteHostId

public RemoteHostId(byte[] peerHash)
Method Detail

getIP

public byte[] getIP()

getPort

public int getPort()

getPeerHash

public byte[] getPeerHash()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(boolean includePort)

toString

public static java.lang.String toString(byte[] ip)

toHostString

public java.lang.String toHostString()