|
Mobile Tools for Java Release 1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IDeviceRegistry
The device registry is the main entry point that is used to manage the devices that are currently supported on a MTJ installation. When a SDK is imported it will return a list of devices that must be added to the registry in order to have them available to MTJ.
IDevice,
IPreverifier| Method Summary | |
|---|---|
void |
addDevice(IDevice device)
Add a new device instance to the device registry. |
void |
addRegistryListener(IDeviceRegistryListener listener)
Add the specified listener to the list of listeners for changes in this registry. |
void |
clear()
Clear the registry of all entries. |
void |
enableDeviceAddedEvent(boolean fire)
Enable the DeviceAdded Event to be fired to all IDeviceRegistryListener instances registered using
addRegistryListener(IDeviceRegistryListener) when the
addDevice(IDevice) is invoked. |
List<IDevice> |
getAllDevices()
Return a list of all of the devices in the registry. |
IDevice |
getDefaultDevice()
Return the default device or null if one is not specified. |
IPreverifier |
getDefaultPreferifier()
Return the default preverifier or null if one is not
specified. |
IDevice |
getDevice(String groupName,
String deviceName)
Return the device with the specified key or null if no such
device is found in the registry. |
int |
getDeviceCount()
Return the number of devices registered. |
List<String> |
getDeviceGroups()
Return the registered device groups. |
List<IDevice> |
getDevices(String groupName)
Return the devices found in the specified group or null if
the specified group cannot be found. |
boolean |
isDeviceAddedEventEnabled()
Checks if the DeviceAdded Event will be fired to all IDeviceRegistryListener instances registered using
addRegistryListener(IDeviceRegistryListener) or not when
invoking addDevice(IDevice). |
void |
load()
Load the contents of the device registry from the storage file in the plug-in state location. |
void |
removeDevice(IDevice device)
Remove the specified device from the registry if it exists. |
void |
removeRegistryListener(IDeviceRegistryListener listener)
Remove the specified listener to the list of listeners for changes in this registry. |
void |
setDefaultDevice(IDevice device)
Set the default device. |
void |
setDefaultPreverifer(IPreverifier preverifier)
Set the default preverifier. |
void |
store()
Store out the contents of the registry into the standard device storage file in the plug-in state location. |
| Methods inherited from interface org.eclipse.mtj.core.persistence.IPersistable |
|---|
loadUsing, storeUsing |
| Method Detail |
|---|
void addDevice(IDevice device)
throws IllegalArgumentException,
PersistenceException
device - the device instance to be added to the device registry.
IllegalArgumentException - if the device is not well formed.
PersistenceException - if there is a problem doing the initial
registry loadvoid addRegistryListener(IDeviceRegistryListener listener)
listener -
void clear()
throws PersistenceException
PersistenceException - if there is a problem doing the initial
registry loadvoid enableDeviceAddedEvent(boolean fire)
IDeviceRegistryListener instances registered using
addRegistryListener(IDeviceRegistryListener) when the
addDevice(IDevice) is invoked.
By default, this event is enabled. Use the
isDeviceAddedEventEnabled() to get current event firing status.
fire - flag indicating if the DeviceAdded Event should be fired or
not.
List<IDevice> getAllDevices()
throws PersistenceException
PersistenceException - if there is a problem doing the initial
registry loadIDevice getDefaultDevice()
null if one is not specified.
IPreverifier getDefaultPreferifier()
null if one is not
specified.
IDevice getDevice(String groupName,
String deviceName)
throws PersistenceException
null if no such
device is found in the registry.
groupName - deviceName -
PersistenceException - if there is a problem doing the initial
registry load
int getDeviceCount()
throws PersistenceException
PersistenceException - if there is a problem doing the initial
registry load
List<String> getDeviceGroups()
throws PersistenceException
PersistenceException - if there is a problem doing the initial
registry load
List<IDevice> getDevices(String groupName)
throws PersistenceException
null if
the specified group cannot be found.
groupName -
PersistenceExceptionboolean isDeviceAddedEventEnabled()
IDeviceRegistryListener instances registered using
addRegistryListener(IDeviceRegistryListener) or not when
invoking addDevice(IDevice).
true is DeviceAdded Event will be fired when
addDevice(IDevice) is invoked, false
otherwise.
void load()
throws PersistenceException
PersistenceException
void removeDevice(IDevice device)
throws PersistenceException
device -
PersistenceException - if there is a problem doing the initial
registry loadvoid removeRegistryListener(IDeviceRegistryListener listener)
listener - void setDefaultDevice(IDevice device)
device - void setDefaultPreverifer(IPreverifier preverifier)
device -
void store()
throws PersistenceException,
TransformerException,
IOException
PersistenceException
TransformerException
IOException
|
Mobile Tools for Java Release 1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||