org.jclouds.virtualbox.functions
Class LaunchMachineIfNotAlreadyRunning
java.lang.Object
org.jclouds.virtualbox.functions.LaunchMachineIfNotAlreadyRunning
- All Implemented Interfaces:
- com.google.common.base.Function<org.virtualbox_4_1.IMachine,org.virtualbox_4_1.ISession>
public class LaunchMachineIfNotAlreadyRunning
- extends Object
- implements com.google.common.base.Function<org.virtualbox_4_1.IMachine,org.virtualbox_4_1.ISession>
Starts a machine using launchMachine() with the provided type and
environment.
Note that launchMachine() may throw VBoxException with the following error
codes:
VBOX_E_UNEXPECTED: Virtual machine not registered. VBOX_E_INVALIDARG: Invalid
session type type. VBOX_E_OBJECT_NOT_FOUND: No machine matching machineId
found. VBOX_E_INVALID_OBJECT_STATE: Session already open or being opened.
VBOX_E_IPRT_ERROR: Launching process for machine failed. VBOX_E_VM_ERROR:
Failed to assign machine to session.
- Author:
- Mattias Holmqvist
- See Also:
ErrorCode
|
Method Summary |
org.virtualbox_4_1.ISession |
apply(org.virtualbox_4_1.IMachine machine)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.google.common.base.Function |
equals |
logger
@Named(value="jclouds.compute")
protected Logger logger
LaunchMachineIfNotAlreadyRunning
public LaunchMachineIfNotAlreadyRunning(org.virtualbox_4_1.VirtualBoxManager manager,
ExecutionType type,
String environment)
apply
public org.virtualbox_4_1.ISession apply(@Nullable
org.virtualbox_4_1.IMachine machine)
- Specified by:
apply in interface com.google.common.base.Function<org.virtualbox_4_1.IMachine,org.virtualbox_4_1.ISession>
Copyright © 2009-2012 jclouds. All Rights Reserved.