com.hazelcast.util

## Class AddressUtil

- java.lang.Object
- - com.hazelcast.util.AddressUtil

-     public final class AddressUtil
      extends Object

  AddressUtil contains Address helper methods.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AddressUtil.AddressHolder` Holds address
    `static class` | `AddressUtil.AddressMatcher` http://docs.oracle.com/javase/1.5.0/docs/guide/net/ipv6_guide/index.html
    `static class` | `AddressUtil.InvalidAddressException` Thrown when given address is not valid.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static InetAddress` | `fixScopeIdAndGetInetAddress(InetAddress inetAddress)`
    `static AddressUtil.AddressHolder` | `getAddressHolder(String address)`
    `static AddressUtil.AddressHolder` | `getAddressHolder(String address, int defaultPort)`
    `static AddressUtil.AddressMatcher` | `getAddressMatcher(String address)` Gets an AddressMatcher for a given addresses.
    `static Inet6Address` | `getInetAddressFor(Inet6Address inetAddress, String scope)`
    `static Collection<String>` | `getMatchingIpv4Addresses(AddressUtil.AddressMatcher addressMatcher)`
    `static Collection<Integer>` | `getOutboundPorts(Collection<Integer> ports, Collection<String> portDefinitions)`
    `static Collection<Inet6Address>` | `getPossibleInetAddressesFor(Inet6Address inet6Address)`
    `static boolean` | `isIpAddress(String address)`
    `static boolean` | `matchAnyDomain(String name, Collection<String> patterns)`
    `static boolean` | `matchAnyInterface(String address, Collection<String> interfaces)`
    `static boolean` | `matchDomain(String name, String pattern)`
    `static boolean` | `matchInterface(String address, String interfaceMask)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### matchAnyInterface

          public static boolean matchAnyInterface(String address,
                                                  Collection<String> interfaces)

    - #### matchInterface

          public static boolean matchInterface(String address,
                                               String interfaceMask)

    - #### matchAnyDomain

          public static boolean matchAnyDomain(String name,
                                               Collection<String> patterns)

    - #### matchDomain

          public static boolean matchDomain(String name,
                                            String pattern)

    - #### getAddressHolder

          public static AddressUtil.AddressHolder getAddressHolder(String address)

    - #### getAddressHolder

          public static AddressUtil.AddressHolder getAddressHolder(String address,
                                                                   int defaultPort)

    - #### isIpAddress

          public static boolean isIpAddress(String address)

    - #### fixScopeIdAndGetInetAddress

          public static InetAddress fixScopeIdAndGetInetAddress(InetAddress inetAddress)
                                                         throws SocketException

      Throws:
        `SocketException`

    - #### getInetAddressFor

          public static Inet6Address getInetAddressFor(Inet6Address inetAddress,
                                                       String scope)
                                                throws UnknownHostException,
                                                       SocketException

      Throws:
        `UnknownHostException`
        `SocketException`

    - #### getPossibleInetAddressesFor

          public static Collection<Inet6Address> getPossibleInetAddressesFor(Inet6Address inet6Address)

    - #### getMatchingIpv4Addresses

          public static Collection<String> getMatchingIpv4Addresses(AddressUtil.AddressMatcher addressMatcher)

    - #### getAddressMatcher

          public static AddressUtil.AddressMatcher getAddressMatcher(String address)

      Gets an AddressMatcher for a given addresses.
      Parameters:
        `address` - the address
      Returns:
        the returned AddressMatcher. The returned value will never be null.
      Throws:
        `AddressUtil.InvalidAddressException` - if the address is not valid.

    - #### getOutboundPorts

          public static Collection<Integer> getOutboundPorts(Collection<Integer> ports,
                                                             Collection<String> portDefinitions)

Copyright © 2019. All rights reserved.