Interface IMobileDeviceManager
-
public interface IMobileDeviceManager
Mobile device manager. Allows clients to open device managers for the requesting mobile OS and launch mobile devices.The manager is facade for registered
delegates
.- Restriction:
- This interface is not intended to be extended by clients.
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<IMobileDevice>
getDevices()
Get existing mobile devices.Collection<? extends IMobileDevice>
getDevices(IMobileOs mobileOs)
Get existing mobile devices.boolean
isEnabled(IMobileOs mobileOs)
Returns whether the device manager is now enable to work for the given mobile OS.boolean
launchDevice(IMobileDevice device, org.eclipse.core.runtime.IProgressMonitor monitor)
Launch the given mobile device.Optional<Process>
openDeviceManager(IMobileOs mobileOs)
Open the device manager for the given mobile OS.void
shutdown()
Shut down manager work.
-
-
-
Method Detail
-
isEnabled
boolean isEnabled(IMobileOs mobileOs)
Returns whether the device manager is now enable to work for the given mobile OS.- Parameters:
mobileOs
- the mobile OS to open device manager for, cannot benull
- Returns:
- whether the device manager is now enable to work for the given mobile OS
-
openDeviceManager
Optional<Process> openDeviceManager(IMobileOs mobileOs) throws MobileDeviceException
Open the device manager for the given mobile OS. Returns started device manager process if possible.- Parameters:
mobileOs
- the mobile OS to open device manager for, cannot benull
- Returns:
- an optional started device manager process if possible
- Throws:
MobileDeviceException
- if an error occurred during device manager open
-
getDevices
Collection<IMobileDevice> getDevices()
Get existing mobile devices.- Returns:
- existing mobile devices, never
null
, can be empty
-
getDevices
Collection<? extends IMobileDevice> getDevices(IMobileOs mobileOs)
Get existing mobile devices.- Parameters:
mobileOs
- the mobile OS to get devices for, cannot benull
- Returns:
- existing mobile devices, never
null
, can be empty
-
launchDevice
boolean launchDevice(IMobileDevice device, org.eclipse.core.runtime.IProgressMonitor monitor) throws MobileDeviceException
Launch the given mobile device. Returns whether device was successfully launched.Note that long running launch operations can be cancelled by the manager client,and implementation is intended to check cancellation status of the provided progress
monitor
.- Parameters:
device
- the mobile device to launch, will be one ofexisting
devices, returned by the manager, cannot benull
monitor
- the progress monitor to report progress to and check cancellation status, cannot benull
- Returns:
- whether the device was successfully launched
- Throws:
MobileDeviceException
- if an error occurred during mobile device access
-
shutdown
void shutdown()
Shut down manager work. Manager disposes all registered delegates and will no longer be able to work.
-
-