Search in sources :

Example 1 with ConsoleOptionsParams

use of org.ovirt.engine.core.common.queries.ConsoleOptionsParams in project ovirt-engine by oVirt.

the class VncNativeImpl method invokeClient.

@Override
public void invokeClient() {
    // todo avoid code duplication with spice
    AsyncQuery<QueryReturnValue> callback = new AsyncQuery<>(returnValue -> // $NON-NLS-1$
    ConsoleModel.makeConsoleConfigRequest(// $NON-NLS-1$
    "console.vv", // $NON-NLS-1$
    "application/x-virt-viewer; charset=UTF-8", returnValue.getReturnValue()));
    Frontend.getInstance().runQuery(QueryType.GetConsoleDescriptorFile, new ConsoleOptionsParams(getOptions()), callback);
}
Also used : QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) ConsoleOptionsParams(org.ovirt.engine.core.common.queries.ConsoleOptionsParams) AsyncQuery(org.ovirt.engine.ui.frontend.AsyncQuery)

Example 2 with ConsoleOptionsParams

use of org.ovirt.engine.core.common.queries.ConsoleOptionsParams in project ovirt-engine by oVirt.

the class BackendVmGraphicsConsoleResource method generateDescriptorResponse.

private QueryReturnValue generateDescriptorResponse() throws Exception {
    org.ovirt.engine.core.common.businessentities.GraphicsType graphicsType = BackendGraphicsConsoleHelper.asGraphicsType(consoleId);
    ConsoleOptions consoleOptions = new ConsoleOptions(graphicsType);
    consoleOptions.setVmId(guid);
    QueryReturnValue configuredOptionsReturnValue = runQuery(QueryType.ConfigureConsoleOptions, new ConfigureConsoleOptionsParams(consoleOptions, true));
    if (!configuredOptionsReturnValue.getSucceeded()) {
        throw new Exception(configuredOptionsReturnValue.getExceptionString());
    }
    return runQuery(QueryType.GetConsoleDescriptorFile, new ConsoleOptionsParams(configuredOptionsReturnValue.getReturnValue()));
}
Also used : QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) ConfigureConsoleOptionsParams(org.ovirt.engine.core.common.queries.ConfigureConsoleOptionsParams) ConsoleOptionsParams(org.ovirt.engine.core.common.queries.ConsoleOptionsParams) ConfigureConsoleOptionsParams(org.ovirt.engine.core.common.queries.ConfigureConsoleOptionsParams) ConsoleOptions(org.ovirt.engine.core.common.console.ConsoleOptions)

Example 3 with ConsoleOptionsParams

use of org.ovirt.engine.core.common.queries.ConsoleOptionsParams in project ovirt-engine by oVirt.

the class SpiceNativeImpl method invokeClient.

@Override
public void invokeClient() {
    // todo avoid code duplication with vnc
    AsyncQuery<QueryReturnValue> callback = new AsyncQuery<>(returnValue -> // $NON-NLS-1$
    ConsoleModel.makeConsoleConfigRequest(// $NON-NLS-1$
    "console.vv", // $NON-NLS-1$
    "application/x-virt-viewer; charset=UTF-8", returnValue.getReturnValue()));
    Frontend.getInstance().runQuery(QueryType.GetConsoleDescriptorFile, new ConsoleOptionsParams(getOptions()), callback);
}
Also used : QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) ConsoleOptionsParams(org.ovirt.engine.core.common.queries.ConsoleOptionsParams) AsyncQuery(org.ovirt.engine.ui.frontend.AsyncQuery)

Aggregations

ConsoleOptionsParams (org.ovirt.engine.core.common.queries.ConsoleOptionsParams)3 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)3 AsyncQuery (org.ovirt.engine.ui.frontend.AsyncQuery)2 ConsoleOptions (org.ovirt.engine.core.common.console.ConsoleOptions)1 ConfigureConsoleOptionsParams (org.ovirt.engine.core.common.queries.ConfigureConsoleOptionsParams)1