|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IEntityClassifierService
A component that wishes to participate in entity classification needs to
implement the IEntityClassifier interface, and register with the Device
Manager as an entity classifier. An entity is classified by the classifier
into an IEntityClass
Method Summary | |
---|---|
void |
addListener(IEntityClassListener listener)
Adds a listener to listen for IEntityClassifierServices notifications |
IEntityClass |
classifyEntity(Entity entity)
Classify 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()
Return the most general list of fields that should be used as key fields. |
IEntityClass |
reclassifyEntity(IDevice curDevice,
Entity entity)
Reclassify the given entity into a class. |
Method Detail |
---|
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 classify
getKeyFields()
java.util.EnumSet<IDeviceService.DeviceField> getKeyFields()
IEntityClass
returned by classifyEntity(net.floodlightcontroller.devicemanager.internal.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()}
,
IEntityClassifierService#classifyEntity}
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 reclassify
void 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |