Get the multicast socket address.

@return the multicast address
355932
public InetSocketAddress getMulticastSocketAddress() {
        if (multicastAddress == null) {
            throw MESSAGES.noMulticastBinding(name);
        }
        return new InetSocketAddress(multicastAddress, multicastPort);
    }
573169
public Address getEventFiringAddress() {
        if (eventFiringAddress == null) {
            eventFiringAddress = new Address(AddressPlan.SIP,
                    ((ToHeader) wrappedTransaction.getRequest().getHeader(ToHeader.NAME))
                    .getAddress().toString());
        }
        return eventFiringAddress;
    }
42533
public String getHostName() {
        if( addr instanceof NbtAddress ) {
            return ((NbtAddress)addr).getHostName();
        }
        return ((InetAddress)addr).getHostName();
    }
1130949
public static String getHostName(SocketAddress socketAddress) {
        if (socketAddress == null) {
            return null;
        }

        if (socketAddress instanceof InetSocketAddress) {
            InetAddress addr = ((InetSocketAddress) socketAddress).getAddress();
            if(addr != null){
                return addr.getHostAddress();
            }
        }

        return null;
    }
1310372
public static InetAddress getRemoteIp() {
    Call call = CurCall.get();
    if (call != null) {
      return call.connection.socket.getInetAddress();
    }
    return null;
  }
1147380
public String getServerAddr()
    {
        if (_connection instanceof Socket)
            return ((Socket)_connection).getLocalAddress().getHostAddress();
        return _listener.getHost();
    }
765482
public InetAddress getInetAddress(){
      if(localIP == null){
	 try{
	   localIP = InetAddress.getByName(localHost);
	 }catch(UnknownHostException e){
	   return null;
	 }
      }
      return localIP;
   }
148178
public static byte[] realMacAddress() {
        byte[] mac = null;
        try {
            // enumerations are wonky...
            Enumeration<NetworkInterface> networkInterfaces = getNetworkInterfaces();
            while (networkInterfaces.hasMoreElements()) {
                NetworkInterface n = networkInterfaces.nextElement();
                byte[] possibleMac = n.getHardwareAddress();
                if (possibleMac != null && possibleMac.length == 6) {
                    mac = possibleMac;
                    break;
                }
            }
            if (mac == null) {
                throw new UnsupportedOperationException("Could not retrieve hardware MAC address, no MAC addresses detected");
            }
        } catch (SocketException e) {
            throw new UnsupportedOperationException("Could not retrieve hardware MAC address, SocketException occurred", e);
        }
        return mac;
    }
320074
@Nonnull
	public String getNodeId(final InetSocketAddress socketAddress) throws IllegalArgumentException {
		if ( socketAddress == null ) {
			throw new IllegalArgumentException("SocketAddress must not be null.");
		}
		final String result = _address2Ids.get( socketAddress );
		if ( result == null ) {
			throw new IllegalArgumentException("SocketAddress " + socketAddress + " not known (registered addresses: " + _address2Ids.keySet() + ").");
		}
		return result;
	}
1350700
public Address[] getAddresses() {
    if (addresses != null)
      return addresses;

    if (hosts != null) {
      addresses = new Address[hosts.length];
      for (int i = 0; i < hosts.length; i++)
        addresses[i] = new Address(hosts[i], factory.getPort());
      return addresses;
    }

    Address address = factory == null ? new Address("localhost", -1) : new Address(
        factory.getHost(), factory.getPort());
    return new Address[] { address };
  }
1270817
public String getRemoteAddr()
    {
        if (_remoteAddr==null)
        {
            if (_remoteInetAddress==null)
                return "127.0.0.1";
            _remoteAddr=_remoteInetAddress.getHostAddress();
        }
        return _remoteAddr;
    }
44876
public String getRemoteHost()
  {
    InetAddress remoteAddress = addressRemote();
    
    if (remoteAddress != null)
      return remoteAddress.getHostAddress();
    else
      return null;
  }
939972
public alluxio.grpc.NetAddress getMasterAddress() {
    return masterAddress_ == null ? alluxio.grpc.NetAddress.getDefaultInstance() : masterAddress_;
  }
223819
public String getLocalHost()
  {
    InetAddress localAddress = addressLocal();
    
    if (localAddress != null)
      return localAddress.getHostAddress();
    else
      return null;
  }
929920
SocketAddress getRemoteSocketAddress() {
        // a lot could go wrong here, so rather than put in a bunch of code
        // to check for nulls all down the chain let's do it the simple
        // yet bulletproof way
        try {
            return ((SocketChannel) sendThread.sockKey.channel()).socket()
                    .getRemoteSocketAddress();
        } catch (NullPointerException e) {
            return null;
        }
    }
1265062
public static Set<String> getLocalAddresses() {
        try {
            List<NetworkInterface> interfaces = Collections.list(NetworkInterface.getNetworkInterfaces());

            Set<String> result = new HashSet<>();

            for (NetworkInterface networkInterface : interfaces) {
                if (networkInterface.isLoopback() || !networkInterface.isUp())
                    continue;

                for (InterfaceAddress address : networkInterface.getInterfaceAddresses()) {
                    String addr = address.getAddress().getHostAddress();

                    if (addr == null || addr.isEmpty() || addr.contains(":"))
                        continue;

                    result.add(addr);
                }
            }

            return result;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
1094186
@Override
    public String getAddress()
    {
        if (((InetSocketAddress) address.address()).getPort() == 0) {
            return address(address);
        }
        return address.toString();
    }