public interface IEntityClassifierService extends IService
IEntityClass
Modifier and Type | Method and Description |
---|---|
void |
addListener(IEntityClassListener listener)
Adds a listener to listen for IEntityClassifierServices notifications
|
IEntityClass |
classifyEntity(Entity entity)
Classifies the given entity into an IEntityClass.
|
void |
deviceUpdate(IDevice oldDevice,
java.util.Collection<? extends IDevice> newDevices)
Once reclassification is complete for a device, this method will be
called.
|
java.util.EnumSet<IDeviceService.DeviceField> |
getKeyFields()
Returns the most general list of fields that should be used as key
fields.
|
IEntityClass |
reclassifyEntity(IDevice curDevice,
Entity entity)
Reclassifies the given entity into a class.
|
IEntityClass classifyEntity(Entity entity)
getKeyFields()
be sufficient for classifying entities. That is, if two entities are
identical except for a field that is not a key field, they must be
assigned the same class. Furthermore, entity classification must be
transitive: For all entities x, y, z, if x and y belong to a class c, and
y and z belong class c, then x and z must belong to class c.entity
- the entity to classifygetKeyFields()
java.util.EnumSet<IDeviceService.DeviceField> getKeyFields()
IEntityClass
returned by classifyEntity(etri.sdn.controller.module.devicemanager.Entity)
.
The key fields for an entity classifier must not change unless associated
with a flush of all entity state. The list of key fields must be the union
of all key fields that could be returned by
IEntityClass.getKeyFields()
.IEntityClass.getKeyFields()
,
classifyEntity(Entity entity)
IEntityClass reclassifyEntity(IDevice curDevice, Entity entity)
Note that you must take steps to ensure you always return classes in some consistent ordering.
curDevice
- the device currently associated with the entityentity
- the entity to reclassifyvoid deviceUpdate(IDevice oldDevice, java.util.Collection<? extends IDevice> newDevices)
oldDevice
- the original device objectnewDevices
- all the new devices derived from the entities of the old device.
If null, the old device was unchanged.void addListener(IEntityClassListener listener)
listener
- The listener that wants the notifications