public interface DeviceInfo extends FacetProvider
Modifier and Type | Method and Description |
---|---|
DeviceInfo |
evolve()
A request to "evolve" this device info instance to reflect current
information that may have been collected.
|
String |
exportData()
Exports the contents of the device info into a string form.
|
int |
getGeneration()
Get the generation number of the device info.
|
String |
getTypeName()
Returns the name of the device type backing this instance.
|
boolean |
importData(String data)
Imports the contents of the device info from the specified
export-encoded string.
|
getFacet, getFacetClasses, getFacetClassNames, isSupported
String getTypeName()
DeviceInfo evolve()
If the device info contains additional information to warrant further evolution then an altered or a different device info instance will be returned, whose generation number will be greater than the original device info generation number. Otherwise, the same device info instance may be returned with its generation number unchanged to indicate that no evolution occurred.
A recommended pattern of use is
DeviceInfo info = ... int originalGeneration = info.getGeneration(); ... // Attempt to evolve the underlying device type when we think more // information about the underlying device may available to to // further narrow the specific of the device type. info = info.evolve(); if (originalGeneration < info.getGeneration()) // Device info has evolved ... else // Device info did not evolve any further ...
int getGeneration()
DeviceInfoProvider.create()
methods.String exportData()
importData(String)
boolean importData(String data)
There is no mandate to be able to import data exported from a device info of a different type.
data
- string previously encoded via exportData()
Copyright © 2015. All Rights Reserved.