Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.sdk.device
Interface IDeviceFinder


public interface IDeviceFinder

The device finder allows access to device instances available in a specified folder. These devices will be imported using the registered device importers.

Clients may access the IDeviceFinder implementation through the MTJCore.getDeviceFinder() method.

Since:
1.0
Restriction:
This interface is not intended to be implemented by clients.

Method Summary
 List<IDevice> findDevices(File directory, IProgressMonitor monitor)
          Return all devices that can be found in the specified directory or any sub-directories.
 List<IDevice> findDevices(String deviceImporterID, File directory, IProgressMonitor monitor)
          Return all devices that can be found in the specified directory or any sub-directories.
 

Method Detail

findDevices

List<IDevice> findDevices(File directory,
                          IProgressMonitor monitor)
                          throws CoreException,
                                 InterruptedException
Return all devices that can be found in the specified directory or any sub-directories. This method will consult all registered IDeviceImporter implementations that have been registered with the system.

Parameters:
directory - the directory in which the devices must be searched.
monitor - a progress monitor, or null if progress reporting is not desired.
Returns:
a list of devices instances found in the specified directory or an empty list if no device was found.
Throws:
CoreException - if a device importer found an error occurred while searching for the devices.
InterruptedException - if the operation detects a request to cancel, using IProgressMonitor.isCanceled(), it should exit by throwing InterruptedException.

findDevices

List<IDevice> findDevices(String deviceImporterID,
                          File directory,
                          IProgressMonitor monitor)
                          throws CoreException,
                                 InterruptedException
Return all devices that can be found in the specified directory or any sub-directories. This method will consult the IDeviceImporter implementation that have been registered with the informed deviceImporterID.

Parameters:
deviceImporterID - a fully-qualified identifier for a particular device importer. The list of importer IDs provided by MTJ can be found at IDeviceImporter.
directory - the directory in which the devices must be searched.
monitor - a progress monitor, or null if progress reporting is not desired.
Returns:
a list of devices instances found in the specified directory or an empty list if no device was found.
Throws:
CoreException - if the specified device importer found an error occurred while searching for the devices.
InterruptedException - if the operation detects a request to cancel, using IProgressMonitor.isCanceled(), it should exit by throwing InterruptedException.

Mobile Tools for Java
Release 1.0