Interface IMobileDeviceManagerDelegate<T extends IMobileDevice>
- Type Parameters:
T- the mobile device implementation, that is specific for the mobile OS
public interface IMobileDeviceManagerDelegate<T extends IMobileDevice>Describes a specific type of mobile device manager delegate. Supported mobile device manager delegates are defined by extensions. Mobile device manager delegate extension is defined in
Following is an example definition of an 1C:Enterprise Runtime extension:
<extension point="com._1c.g5.v8.dt.platform.services.mobile.mobileDeviceManagerDelegates"> <delegate delegate="com.example.SomeOsDeviceManagerDelegate" mobileOs="com._1c.g5.v8.dt.platform.services.mobile.mobileOs.SomeOs"> </delegate> </extension>
Defined mobile device manager delegates will be used for appropriate mobile OS existing devices lookup and launch. Also can be used to open underlying device manager.
This interface is intended to be implemented and registered by clients. Instances are not intended to be explicitly used by client. Clients may use
- See Also:
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
dispose()Dispose this mobile device manager delegate.
getDevices()Get existing mobile devices.
isEnabled()Returns whether this device manager is now enable to work.
launchDevice(T device, org.eclipse.core.runtime.IProgressMonitor monitor)Launch the given mobile device.
openDeviceManager()Open the device manager.
boolean isEnabled()Returns whether this device manager is now enable to work.
Implementation is intended to check, whether all internal settings is set (mobile OS SDK path or manager path for example - depends on target mobile OS requirements).
- whether this device manager is now enable to work
Optional<Process> openDeviceManager() throws MobileDeviceExceptionOpen the device manager.
Implementation is intended to open to the user underlying mobile OS device manager to perform device managing actions, e.g. device adding.
- an optional started device manager process if possible
MobileDeviceException- if an error occurred during device manager open
Collection<T> getDevices() throws MobileDeviceExceptionGet existing mobile devices.
Implementation is intended to obtain all existing devices from the underlying mobile OS device manager and convert them to the specific
IMobileDeviceimplementation, that can be later launched with the
- existing mobile devices, never
null, can be empty
MobileDeviceException- if an error occurred during mobile devices access
boolean launchDevice(T device, org.eclipse.core.runtime.IProgressMonitor monitor) throws MobileDeviceExceptionLaunch the given mobile device. Launching is intended to be synchronous: implementation need to wait until mobile device start operation finishes. Returns whether device was successfully launched.
Implementation also is intended to check the device state: if device is already started, then do nothing and return
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
device- the mobile device to launch, will be one of
existingdevices, returned by the manager, cannot be
monitor- the progress monitor to report progress to and check cSancellation status, cannot be
- whether the device was successfully launched
MobileDeviceException- if an error occurred during mobile device access
void dispose()Dispose this mobile device manager delegate. Delegate implementation need to cleanup any resources that it maintains.
Method is called on DT IDE shutdown.