本文整理汇总了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"));
}
}
示例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"));
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例10: isEnabled
import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public boolean isEnabled() {
return ((BooleanSetting) machine.getSetting(MachineAttribute.UsbOhci)).getValue();
}
示例11: isEhciEnabled
import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public boolean isEhciEnabled() {
return ((BooleanSetting) machine.getSetting(MachineAttribute.UsbEhci)).getValue();
}
示例12: ACPISetting
import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
public ACPISetting(boolean isEnabled) {
super(MachineAttribute.ACPI, isEnabled);
}
示例13: CurrentSnapshotSetting
import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
public CurrentSnapshotSetting(String uuid) {
super(MachineAttribute.CurrentSnapshotUuid, uuid);
}
示例14: getProtocol
import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
@Override
public String getProtocol() {
return getSetting(MachineAttribute.VrdeModule).getString();
}
示例15: IoAPICSetting
import io.kamax.hbox.constant.MachineAttribute; //导入依赖的package包/类
public IoAPICSetting(boolean isEnabled) {
super(MachineAttribute.IoAPIC, isEnabled);
}