public BindingInfo bindingInfo ( String socketBindingName ) { SocketBinding sb = socketBinding ( socketBindingName ) ; if ( sb == null ) { throw new IllegalArgumentException ( "Can't find socket binding with name \"" + socketBindingName + "\"" ) ; } Interface iface = interfaceRef ( sb . getInterfaceRef ( ) ) ; if ( iface == null ) { throw new IllegalArgumentException ( "Can't find interface with name \"" + sb . getInterfaceRef ( ) + "\"" ) ; } BindingInfo result = new BindingInfo ( sb . getPort ( ) ) ; for ( Interface . InetAddress address : iface . getAddresses ( ) ) { result . getAddresses ( ) . add ( address . getIp ( ) ) ; } return result ; }
Returns valid information about interfaces + port to listen on