public NetworkAddressFactoryImpl(int streamListenPort) throws InitializationException { System.setProperty("java.net.preferIPv4Stack", "true"); String useInterfacesString = System.getProperty(SYSTEM_PROPERTY_NET_IFACES); if (useInterfacesString != null) { String[] userInterfacesStrings = useInterfacesString.split(","); useInterfaces.addAll(Arrays.asList(userInterfacesStrings)); } String useAddressesString = System.getProperty(SYSTEM_PROPERTY_NET_ADDRESSES); if (useAddressesString != null) { String[] useAddressesStrings = useAddressesString.split(","); useAddresses.addAll(Arrays.asList(useAddressesStrings)); } discoverNetworkInterfaces(); discoverBindAddresses(); if ((networkInterfaces.size() == 0 || bindAddresses.size() == 0)) { log.warning("No usable network interface or addresses found"); if(requiresNetworkInterface()) { throw new NoNetworkException( "Could not discover any usable network interfaces and/or addresses" ); } } this.streamListenPort = streamListenPort; }
throw new NoNetworkException( "No usable network interface and/or addresses available, check the log for errors." );
public NetworkAddressFactoryImpl(int streamListenPort) throws InitializationException { System.setProperty("java.net.preferIPv4Stack", "true"); String useInterfacesString = System.getProperty(SYSTEM_PROPERTY_NET_IFACES); if (useInterfacesString != null) { String[] userInterfacesStrings = useInterfacesString.split(","); useInterfaces.addAll(Arrays.asList(userInterfacesStrings)); } String useAddressesString = System.getProperty(SYSTEM_PROPERTY_NET_ADDRESSES); if (useAddressesString != null) { String[] useAddressesStrings = useAddressesString.split(","); useAddresses.addAll(Arrays.asList(useAddressesStrings)); } discoverNetworkInterfaces(); discoverBindAddresses(); if ((networkInterfaces.size() == 0 || bindAddresses.size() == 0)) { log.warning("No usable network interface or addresses found"); if(requiresNetworkInterface()) { throw new NoNetworkException( "Could not discover any usable network interfaces and/or addresses" ); } } this.streamListenPort = streamListenPort; }
throw new NoNetworkException( "No usable network interface and/or addresses available, check the log for errors." );
public NetworkAddressFactoryImpl(int streamListenPort) throws InitializationException { System.setProperty("java.net.preferIPv4Stack", "true"); String useInterfacesString = System.getProperty(SYSTEM_PROPERTY_NET_IFACES); if (useInterfacesString != null) { String[] userInterfacesStrings = useInterfacesString.split(","); useInterfaces.addAll(Arrays.asList(userInterfacesStrings)); } String useAddressesString = System.getProperty(SYSTEM_PROPERTY_NET_ADDRESSES); if (useAddressesString != null) { String[] useAddressesStrings = useAddressesString.split(","); useAddresses.addAll(Arrays.asList(useAddressesStrings)); } discoverNetworkInterfaces(); discoverBindAddresses(); if ((networkInterfaces.size() == 0 || bindAddresses.size() == 0)) { log.warning("No usable network interface or addresses found"); if(requiresNetworkInterface()) { throw new NoNetworkException( "Could not discover any usable network interfaces and/or addresses" ); } } this.streamListenPort = streamListenPort; }
throw new NoNetworkException( "No usable network interface and/or addresses available, check the log for errors." );