rabbit.io
Class ConnectionHandler.Address

java.lang.Object
  extended byrabbit.io.ConnectionHandler.Address
Enclosing class:
ConnectionHandler

public class ConnectionHandler.Address
extends java.lang.Object

A class to handle the addresses of the connections. Basically just a pair of InetAddress and port number.


Field Summary
 java.net.InetAddress ia
          The internet address of this Address.
 int port
          The port number were connected to.
 
Constructor Summary
ConnectionHandler.Address(java.net.InetAddress ia, int port)
          Create a new Address with given InetAddress and port
 
Method Summary
 boolean equals(java.lang.Object o)
          Compare this objcet agains another object.
 int hashCode()
          Get the hash code for this object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ia

public java.net.InetAddress ia
The internet address of this Address.


port

public int port
The port number were connected to.

Constructor Detail

ConnectionHandler.Address

public ConnectionHandler.Address(java.net.InetAddress ia,
                                 int port)
Create a new Address with given InetAddress and port

Parameters:
ia - the InetAddress this Address is connected to.
port - the port number this Address is connected to.
Method Detail

hashCode

public int hashCode()
Get the hash code for this object.

Returns:
the hash code.

equals

public boolean equals(java.lang.Object o)
Compare this objcet agains another object.

Parameters:
o - the Object to compare against.
Returns:
true if the other Object is an Address connected to the same InetAddress and port, false otherwise.