public static List<GatewayAddress> asListFromDomain(final String domainAddress) {
    """
	As list from domain.
	
	@param domainAddress the domain address
	@return the list
    """
        if (domainAddress == null) {
            throw new IllegalArgumentException("domain address must not be null");
        }

        GatewayAddress domain = new GatewayAddress(0, domainAddress);
        InetAddress[] addresses;
        try {
            addresses = InetAddress.getAllByName(domain.getHost());
        } catch (Exception e) {
            throw new IllegalArgumentException("invalid domain '" + domain + "' " + e.getMessage());
        }

        List<GatewayAddress> list = new ArrayList<GatewayAddress>();
        int id = 1;
        for (InetAddress address : addresses) {
            list.add(new GatewayAddress(id++, address.getHostAddress(), domain.getPort()));
        }

        return list;
    }
public static List<GatewayAddress> asListFromDomain(final String domainAddress) {
        if (domainAddress == null) {
            throw new IllegalArgumentException("domain address must not be null");
        }

        GatewayAddress domain = new GatewayAddress(0, domainAddress);
        InetAddress[] addresses;
        try {
            addresses = InetAddress.getAllByName(domain.getHost());
        } catch (Exception e) {
            throw new IllegalArgumentException("invalid domain '" + domain + "' " + e.getMessage());
        }

        List<GatewayAddress> list = new ArrayList<GatewayAddress>();
        int id = 1;
        for (InetAddress address : addresses) {
            list.add(new GatewayAddress(id++, address.getHostAddress(), domain.getPort()));
        }

        return list;
    }
public static List < GatewayAddress > asListFromDomain ( final String domainAddress ) { if ( domainAddress == null ) { throw new IllegalArgumentException ( "domain address must not be null" ) ; } GatewayAddress domain = new GatewayAddress ( 0 , domainAddress ) ; InetAddress [ ] addresses ; try { addresses = InetAddress . getAllByName ( domain . getHost ( ) ) ; } catch ( Exception e ) { throw new IllegalArgumentException ( "invalid domain '" + domain + "' " + e . getMessage ( ) ) ; } List < GatewayAddress > list = new ArrayList < GatewayAddress > ( ) ; int id = 1 ; for ( InetAddress address : addresses ) { list . add ( new GatewayAddress ( id ++ , address . getHostAddress ( ) , domain . getPort ( ) ) ) ; } return list ; }
As list from domain.

@param domainAddress the domain address
@return the list
As list from domain .