Interface NetworkAddressService

  • All Known Implementing Classes:
    NetUtil

    @NonNullByDefault
    public interface NetworkAddressService
    Interface that provides access to configured network addresses
    Author:
    Stefan Triller - Initial contribution
    • Method Detail

      • getPrimaryIpv4HostAddress

        @Nullable String getPrimaryIpv4HostAddress()
        Returns the user configured primary IPv4 address of the system
        Returns:
        IPv4 address as a String in format xxx.xxx.xxx.xxx or null if there is no interface or an error occurred
      • getConfiguredBroadcastAddress

        @Nullable String getConfiguredBroadcastAddress()
        Returns the user configured broadcast address, or the broadcast address of the user configured primary IPv4 if not provided
        Returns:
        IPv4 broadcast address as a String in format xxx.xxx.xxx or null if no broadcast address is found or an error occurred
      • isUseOnlyOneAddress

        boolean isUseOnlyOneAddress()
        Use only one address per interface and family (IPv4 and IPv6). If set listeners should bind only to one address per interface and family.
        Returns:
        use only one address per interface and family
      • isUseIPv6

        boolean isUseIPv6()
        Use IPv6. If not set, IPv6 addresses should be completely ignored by listeners.
        Returns:
        use IPv6