public static URI getLocalBaseURI ( ) { InetAddress localAddr ; String addr ; try { localAddr = InetAddress . getLocalHost ( ) ; addr = localAddr . getHostAddress ( ) ; } catch ( UnknownHostException e ) { LOGGER . warn ( "Issues finding ip address of locahost. Using string 'localhost' for listener address binding" ) ; addr = "localhost" ; } return UriBuilder . fromUri ( "http://" + addr + "/" ) . port ( DEFAULT_PORT ) . build ( ) ; }
Return the local base URI based on the localhost address .