當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。