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);
    }
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.

@param client the client used to execute the management operation

@return the container description

@throws IOException                 if an error occurs while executing the management operation
@throws OperationExecutionException if the operation used to query the container fails