当前位置: 首页>>代码示例>>Java>>正文


Java MachineAttribute类代码示例

本文整理汇总了Java中io.kamax.hbox.constant.MachineAttribute的典型用法代码示例。如果您正苦于以下问题:Java MachineAttribute类的具体用法?Java MachineAttribute怎么用?Java MachineAttribute使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MachineAttribute类属于io.kamax.hbox.constant包,在下文中一共展示了MachineAttribute类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: get

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public _Setting get(IMachine machine) {
    // TODO improve by having a getConsole() in SessionManager and throw the appropriate exception
    try {
        ISession sess = VBoxSessionManager.get().lockAuto(machine.getId());
        try {
            if ((sess.getConsole() != null) && (sess.getConsole().getVRDEServerInfo() != null) && (sess.getConsole().getVRDEServerInfo().getPort() > 0)) {
                return new StringSetting(MachineAttribute.VrdePort, Integer.toString(sess.getConsole().getVRDEServerInfo().getPort()));
            } else {
                return new StringSetting(MachineAttribute.VrdePort, machine.getVRDEServer().getVRDEProperty("TCP/Ports"));
            }
        } finally {
            VBoxSessionManager.get().unlockAuto(machine.getId());
        }
    } catch (MachineLockingException e) {
        return new StringSetting(MachineAttribute.VrdePort, machine.getVRDEServer().getVRDEProperty("TCP/Ports"));
    }
}
 
开发者ID:hyperbox,项目名称:vbox-5.0,代码行数:19,代码来源:VrdePortSettingAction.java

示例2: get

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public _Setting get(IMachine machine) {
    // TODO improve by having a getConsole() in SessionManager and throw the appropriate exception
    try {
        ISession sess = VBoxSessionManager.get().lockAuto(machine.getId());
        try {
            if ((sess.getConsole().getVRDEServerInfo() != null) && (sess.getConsole().getVRDEServerInfo().getPort() > 0)) {
                return new StringSetting(MachineAttribute.VrdePort, Integer.toString(sess.getConsole().getVRDEServerInfo().getPort()));
            } else {
                return new StringSetting(MachineAttribute.VrdePort, machine.getVRDEServer().getVRDEProperty("TCP/Ports"));
            }
        } finally {
            VBoxSessionManager.get().unlockAuto(machine.getId());
        }
    } catch (MachineLockingException e) {
        return new StringSetting(MachineAttribute.VrdePort, machine.getVRDEServer().getVRDEProperty("TCP/Ports"));
    }
}
 
开发者ID:hyperbox,项目名称:vbox-4.3,代码行数:19,代码来源:VrdePortSettingAction.java

示例3: listSettings

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public List<_Setting> listSettings() {
    List<_Setting> settings = new ArrayList<_Setting>();
    for (MachineAttribute setting : MachineAttribute.values()) {
        if (setting.getDeviceType().equals(EntityType.USB)) {
            getSetting(setting);
        }
    }
    return settings;
}
 
开发者ID:hyperbox,项目名称:vbox-4.3,代码行数:11,代码来源:VBoxUSB.java

示例4: listSettings

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public List<_Setting> listSettings() {
    List<_Setting> settings = new ArrayList<_Setting>();
    for (MachineAttribute setting : MachineAttribute.values()) {
        if (setting.getDeviceType().equals(EntityType.Motherboard)) {
            getSetting(setting);
        }
    }
    return settings;
}
 
开发者ID:hyperbox,项目名称:vbox-4.3,代码行数:11,代码来源:VBoxMotherboard.java

示例5: listSettings

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public List<_Setting> listSettings() {
    List<_Setting> settings = new ArrayList<_Setting>();
    for (MachineAttribute setting : MachineAttribute.values()) {
        if (setting.getDeviceType().equals(EntityType.CPU)) {
            getSetting(setting);
        }
    }
    return settings;
}
 
开发者ID:hyperbox,项目名称:vbox-4.3,代码行数:11,代码来源:VBoxCPU.java

示例6: listSettings

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public List<_Setting> listSettings() {
    List<_Setting> settings = new ArrayList<_Setting>();
    for (MachineAttribute setting : MachineAttribute.values()) {
        if (setting.getDeviceType().equals(EntityType.Memory)) {
            getSetting(setting);
        }
    }
    return settings;
}
 
开发者ID:hyperbox,项目名称:vbox-5.0,代码行数:11,代码来源:VBoxMemory.java

示例7: listSettings

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public List<_Setting> listSettings() {
    List<_Setting> settings = new ArrayList<_Setting>();
    for (MachineAttribute setting : MachineAttribute.values()) {
        if (setting.getDeviceType().equals(EntityType.Keyboard)) {
            getSetting(setting);
        }
    }
    return settings;
}
 
开发者ID:hyperbox,项目名称:vbox-5.0,代码行数:11,代码来源:VBoxKeyboard.java

示例8: listSettings

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public List<_Setting> listSettings() {
    List<_Setting> settings = new ArrayList<_Setting>();
    for (MachineAttribute setting : MachineAttribute.values()) {
        if (setting.getDeviceType().equals(EntityType.Display)) {
            getSetting(setting);
        }
    }
    return settings;
}
 
开发者ID:hyperbox,项目名称:vbox-5.0,代码行数:11,代码来源:VBoxDisplay.java

示例9: listSettings

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public List<_Setting> listSettings() {
    List<_Setting> settings = new ArrayList<_Setting>();
    for (MachineAttribute setting : MachineAttribute.values()) {
        if (setting.getDeviceType().equals(EntityType.Mouse)) {
            getSetting(setting);
        }
    }
    return settings;
}
 
开发者ID:hyperbox,项目名称:vbox-5.0,代码行数:11,代码来源:VBoxMouse.java

示例10: isEnabled

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public boolean isEnabled() {
    return ((BooleanSetting) machine.getSetting(MachineAttribute.UsbOhci)).getValue();
}
 
开发者ID:hyperbox,项目名称:vbox-4.3,代码行数:5,代码来源:VBoxUSB.java

示例11: isEhciEnabled

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public boolean isEhciEnabled() {
    return ((BooleanSetting) machine.getSetting(MachineAttribute.UsbEhci)).getValue();
}
 
开发者ID:hyperbox,项目名称:vbox-4.3,代码行数:5,代码来源:VBoxUSB.java

示例12: ACPISetting

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
public ACPISetting(boolean isEnabled) {
    super(MachineAttribute.ACPI, isEnabled);
}
 
开发者ID:hyperbox,项目名称:vbox-common,代码行数:4,代码来源:ACPISetting.java

示例13: CurrentSnapshotSetting

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
public CurrentSnapshotSetting(String uuid) {
    super(MachineAttribute.CurrentSnapshotUuid, uuid);
}
 
开发者ID:hyperbox,项目名称:vbox-common,代码行数:4,代码来源:CurrentSnapshotSetting.java

示例14: getProtocol

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public String getProtocol() {
    return getSetting(MachineAttribute.VrdeModule).getString();
}
 
开发者ID:hyperbox,项目名称:vbox-5.0,代码行数:5,代码来源:VBoxConsole.java

示例15: IoAPICSetting

import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
public IoAPICSetting(boolean isEnabled) {
    super(MachineAttribute.IoAPIC, isEnabled);
}
 
开发者ID:hyperbox,项目名称:vbox-common,代码行数:4,代码来源:IoAPICSetting.java


注:本文中的io.kamax.hbox.constant.MachineAttribute类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。