public class DefaultDeviceIdentityHandler extends DefaultDeviceIdentity implements DeviceIdentityHandler
DefaultDeviceInfo
implementation.Constructor and Description |
---|
DefaultDeviceIdentityHandler(DeviceInfo context)
Constructs a device identity configure facet that is projected onto the
specified device info context.
|
Modifier and Type | Method and Description |
---|---|
void |
apply()
Apply any pending configuration changes to the device.
|
void |
digest(Object memento)
Accepts an opaque memento containing device identity information,
presumably obtained from a prior communication with the device.
|
DeviceInfo |
evolve()
Return an evolved device info context.
|
void |
fetch()
Fetch information pertaining to this facet from the device.
|
void |
generateUniqueId()
Generates a globally unique device ID using device specific information
and a type-specific algorithm and stamps it into the associated device
info entity.
|
void |
setContact(String contact)
Set the device contact.
|
void |
setIpAddress(IpAddress ip)
Set the IP address associated with this facet, if needed.
|
void |
setLocation(String location)
Set the device location.
|
void |
setName(String name)
Set the device name.
|
getContact, getDescription, getDriverFirmwareVersion, getFamily, getFirmwareVersion, getIpAddress, getLocation, getModelNumber, getName, getProductNumber, getSerialNumber, getUniqueId, getVendor, toDebugString, toString
getContext
getTypeName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getContact, getDescription, getDriverFirmwareVersion, getFamily, getFirmwareVersion, getIpAddress, getLocation, getModelNumber, getName, getProductNumber, getSerialNumber, getUniqueId, getVendor
getIpAddress
getContext, getTypeName
public DefaultDeviceIdentityHandler(DeviceInfo context)
context
- the device info of which this is a facetpublic void setIpAddress(IpAddress ip)
This implementation injects the IP address into the backing device info context, in addition to setting the field via super.
setIpAddress
in interface HandlerFacet
setIpAddress
in class AbstractFacet
ip
- the IP addresspublic void fetch()
This implementation does nothing.
fetch
in interface HandlerFacet
public void apply()
This implementation does nothing.
apply
in interface HandlerFacet
public void digest(Object memento)
HandlerFacet.fetch()
method)
to the device in order to obtain the same information.
Implementations are to interpret and digest the information in this memento into the associated device info instance.
This implementation does nothing.
digest
in interface DeviceIdentityHandler
memento
- opaque container of device identity informationpublic void generateUniqueId()
DeviceIdentityHandler
generateUniqueId
in interface DeviceIdentityHandler
public void setName(String name)
DeviceIdentityHandler
setName
in interface DeviceIdentityHandler
name
- the device namepublic void setLocation(String location)
DeviceIdentityHandler
setLocation
in interface DeviceIdentityHandler
location
- the device locationpublic void setContact(String contact)
DeviceIdentityHandler
setContact
in interface DeviceIdentityHandler
contact
- the device contactpublic DeviceInfo evolve()
DeviceIdentityHandler
Note: implementations should use DeviceDriverProvider.switchType(com.hp.device.MutableDeviceInfo, java.lang.String)
if it is determined that the device type needs to change.
evolve
in interface DeviceIdentityHandler
Copyright © 2015. All Rights Reserved.