public void bind ( InetSocketAddress socketBindAddress ) { try { localConnector . stop ( ) ; LOG . info ( "Binding server socket to {}:{}" , socketBindAddress . getHostString ( ) , socketBindAddress . getPort ( ) ) ; localConnector . setHost ( socketBindAddress . getHostString ( ) ) ; localConnector . setPort ( socketBindAddress . getPort ( ) ) ; localConnector . start ( ) ; } catch ( Exception e ) { throw new ServerLifecycleException ( "Failed to restart socket." , e ) ; } }
Reconfigures the server socket to listen on the specified bindAddr and port .