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 plugin.xml.

    Following is an example definition of an 1C:Enterprise Runtime extension:

     <extension point="">

    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 IMobileDeviceManager instead.

    See Also:
    • Method Detail

      • isEnabled

        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
      • openDeviceManager

        Optional<Process> openDeviceManager()
                                     throws MobileDeviceException
        Open 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
      • getDevices

        Collection<T> getDevices()
                          throws MobileDeviceException
        Get existing mobile devices.

        Implementation is intended to obtain all existing devices from the underlying mobile OS device manager and convert them to the specific IMobileDevice implementation, that can be later launched with the launchDevice(IMobileDevice, IProgressMonitor) method.

        existing mobile devices, never null, can be empty
        MobileDeviceException - if an error occurred during mobile devices access
      • launchDevice

        boolean launchDevice​(T device,
                             org.eclipse.core.runtime.IProgressMonitor monitor)
                      throws MobileDeviceException
        Launch 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 true.

        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.

        device - the mobile device to launch, will be one of existing devices, returned by the manager, cannot be null
        monitor - the progress monitor to report progress to and check cSancellation status, cannot be null
        whether the device was successfully launched
        MobileDeviceException - if an error occurred during mobile device access
      • dispose

        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.