TestVBox.java revision ebb33f3aef3b410579a2865109426b798b9d4a9d
/* $Id$ */
* be used to connect to the webservice and (XP)COM APIs. */
/*
* Copyright (C) 2010-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
import org.virtualbox_4_3.*;
public class TestVBox
{
{
switch (type)
{
case OnMachineStateChanged:
{
else
break;
}
}
}
static class EventHandler
{
EventHandler() {}
{
try {
} catch (Throwable t) {
t.printStackTrace();
}
}
}
{
// active mode for Java doesn't fully work yet, and using passive
// is more portable (the only mode for MSCOM and WS) and thus generally
// recommended
try {
for (int i = 0; i < 50; i++)
{
{
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
{
{
boolean hwvirtEnabled = false, hwvirtNestedPaging = false;
boolean paeEnabled = false;
boolean inaccessible = false;
try
{
ram = m.getMemorySize();
}
catch (VBoxException e)
{
name = "<inaccessible>";
inaccessible = true;
}
if (!inaccessible)
{
+ ", HWVirt: " + hwvirtEnabled
+ ", Nested Paging: " + hwvirtNestedPaging
+ ", PAE: " + paeEnabled);
}
}
}
{
while (!p.getCompleted())
{
p.waitForCompletion(200);
return false;
}
return true;
}
{
}
static void testMultiServer()
{
try {
} finally {
}
}
{
long logNo = 0;
long off = 0;
while (true)
{
break;
}
}
static void printErrorInfo(VBoxException e)
{
int i = 1;
{
// optional, usually provides little additional information:
}
}
{
boolean ws = false;
{
ws = true;
}
if (ws)
{
try {
} catch (VBoxException e) {
e.printStackTrace();
}
}
try
{
{
}
}
catch (VBoxException e)
{
printErrorInfo(e);
e.printStackTrace();
}
catch (RuntimeException e)
{
e.printStackTrace();
}
{
e.printStackTrace();
}
if (ws)
{
try {
mgr.disconnect();
} catch (VBoxException e) {
e.printStackTrace();
}
}
}
}