public static ModelNode determineHostAddress ( final ModelControllerClient client ) throws IOException , OperationExecutionException { final ModelNode op = Operations . createReadAttributeOperation ( EMPTY_ADDRESS , "local-host-name" ) ; ModelNode response = client . execute ( op ) ; if ( Operations . isSuccessfulOutcome ( response ) ) { return DeploymentOperations . createAddress ( "host" , Operations . readResult ( response ) . asString ( ) ) ; } throw new OperationExecutionException ( op , response ) ; }
Determines the address for the host being used .