static DefaultContainerDescription lookup ( final ModelControllerClient client ) throws IOException , OperationExecutionException { final ModelNode op = Operations . createReadResourceOperation ( new ModelNode ( ) . setEmptyList ( ) ) ; op . get ( ClientConstants . INCLUDE_RUNTIME ) . set ( true ) ; final ModelNode result = client . execute ( op ) ; if ( Operations . isSuccessfulOutcome ( result ) ) { final ModelNode model = Operations . readResult ( result ) ; final String productName = getValue ( model , "product-name" , "WildFly" ) ; final String productVersion = getValue ( model , "product-version" ) ; final String releaseVersion = getValue ( model , "release-version" ) ; final String launchType = getValue ( model , "launch-type" ) ; return new DefaultContainerDescription ( productName , productVersion , releaseVersion , launchType , "DOMAIN" . equalsIgnoreCase ( launchType ) ) ; } throw new OperationExecutionException ( op , result ) ; }
Queries the running container and attempts to lookup the information from the running container .