Interface Address

All Known Implementing Classes:
TestAddress

public interface Address
Author:
Lars Kroll <[email protected]>
  • Method Details

    • getIp

      Returns:
      the IP address part of this object
    • getPort

      int getPort()
      Returns:
      the port part of this object
    • asSocket

      Get this address as InetSocketAddress. This is used for lookups within network implementation, so it better be fast. Preferably no new object creation should happen as part of this call.
      Returns:
      ip+port of this address.
    • sameHostAs

      boolean sameHostAs​(Address other)
      Compares only the ip+port part of the address for equality. This is used to decide whether or not to reflect messages back up without serialising. Most likely the same as "this.asSocket().equals(other.asSocket())".
      Parameters:
      other - the addess to compare to
      Returns:
      true, if other is on the same port as this