public interface IDeviceService extends IService
Device
objects should be retrieved
from the MessageContext
.Modifier and Type | Interface and Description |
---|---|
static class |
IDeviceService.DeviceField
Fields used in devices for indexes and querying
|
Modifier and Type | Method and Description |
---|---|
void |
addIndex(boolean perClass,
java.util.EnumSet<IDeviceService.DeviceField> keyFields)
Creates an index over a set of fields.
|
void |
addListener(IDeviceListener listener)
Adds a listener to listen for IDeviceManagerServices notifications.
|
void |
addSuppressAPs(long swId,
short port)
Specifies points in the network where attachment points are not to
be learned.
|
IDevice |
findDestDevice(IDevice source,
long macAddress,
java.lang.Short vlan,
java.lang.Integer ipv4Address)
Gets a destination device using entity fields that corresponds with
the given source device.
|
IDevice |
findDevice(long macAddress,
java.lang.Short vlan,
java.lang.Integer ipv4Address,
java.lang.Long switchDPID,
java.lang.Integer switchPort)
Searches for a device exactly matching the provided device fields.
|
java.util.Collection<? extends IDevice> |
getAllDevices()
Gets an unmodifiable collection view over all devices currently known.
|
IDevice |
getDevice(java.lang.Long deviceKey)
Gets the device with the given device key.
|
java.util.Iterator<? extends IDevice> |
queryClassDevices(IDevice reference,
java.lang.Long macAddress,
java.lang.Short vlan,
java.lang.Integer ipv4Address,
java.lang.Long switchDPID,
java.lang.Integer switchPort)
Finds devices that match the provided query.
|
java.util.Iterator<? extends IDevice> |
queryDevices(java.lang.Long macAddress,
java.lang.Short vlan,
java.lang.Integer ipv4Address,
java.lang.Long switchDPID,
java.lang.Integer switchPort)
Finds devices that match the provided query.
|
void |
removeSuppressAPs(long swId,
short port)
Removes setting of points in the network where attachment points
are not to be learned.
|
IDevice getDevice(java.lang.Long deviceKey)
deviceKey
- the key to search forIDevice.getDeviceKey()
IDevice findDevice(long macAddress, java.lang.Short vlan, java.lang.Integer ipv4Address, java.lang.Long switchDPID, java.lang.Integer switchPort) throws java.lang.IllegalArgumentException
Only the key fields as defined by the IEntityClassifierService
will
be important in this search. All key fields MUST be supplied.
queryDevices(java.lang.Long, java.lang.Short, java.lang.Integer, java.lang.Long, java.lang.Integer)
might be more appropriate!
macAddress
- The MAC addressvlan
- the VLAN. Null means no VLAN and is valid even if VLAN is a key field.ipv4Address
- the ipv4 addressswitchDPID
- the switch dpidswitchPort
- the switch portIDevice
or null if no device is found.java.lang.IllegalArgumentException
- if not all key fields of the
current IEntityClassifierService
are specified.IDevice findDestDevice(IDevice source, long macAddress, java.lang.Short vlan, java.lang.Integer ipv4Address) throws java.lang.IllegalArgumentException
source
- the source device. The returned destination will be
in the same entity class as the source.macAddress
- The MAC address for the destinationvlan
- the VLAN if availableipv4Address
- The IP address if available.IDevice
or null if no device is found.java.lang.IllegalArgumentException
- if not all key fields of the
source's IEntityClass
are specified.findDevice(long, Short, Integer, Long, Integer)
java.util.Collection<? extends IDevice> getAllDevices()
void addIndex(boolean perClass, java.util.EnumSet<IDeviceService.DeviceField> keyFields)
perClass
- set to true if the index should be maintained for each
entity class separately.keyFields
- the set of fields on which to indexjava.util.Iterator<? extends IDevice> queryDevices(java.lang.Long macAddress, java.lang.Short vlan, java.lang.Integer ipv4Address, java.lang.Long switchDPID, java.lang.Integer switchPort)
macAddress
- The MAC addressvlan
- the VLANipv4Address
- the ipv4 addressswitchDPID
- the switch dpidswitchPort
- the switch portjava.util.Iterator<? extends IDevice> queryClassDevices(IDevice reference, java.lang.Long macAddress, java.lang.Short vlan, java.lang.Integer ipv4Address, java.lang.Long switchDPID, java.lang.Integer switchPort)
reference
- The reference device to refer to when finding
entity classes.macAddress
- The MAC addressvlan
- the VLANipv4Address
- the ipv4 addressswitchDPID
- the switch dpidswitchPort
- the switch portvoid addListener(IDeviceListener listener)
listener
- The listener that wants the notificationsvoid addSuppressAPs(long swId, short port)
swId
- a switchidport
- a port numbervoid removeSuppressAPs(long swId, short port)
swId
- a switchidport
- a port number