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);
}
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()));
}
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);
}
Aggregations