|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDeviceService
Device manager allows interacting with devices on the network. Note
that under normal circumstances, Device
objects should be retrieved
from the FloodlightContext
rather than from IDeviceManager
.
Nested Class Summary | |
---|---|
static class |
IDeviceService.DeviceField
Fields used in devices for indexes and querying |
Field Summary | |
---|---|
static java.lang.String |
CONTEXT_DST_DEVICE
The destination device for the current packet-in, if applicable. |
static java.lang.String |
CONTEXT_ORIG_DST_DEVICE
The original destination device for the current packet-in |
static java.lang.String |
CONTEXT_SRC_DEVICE
The source device for the current packet-in, if applicable. |
static FloodlightContextStore<IDevice> |
fcStore
A FloodlightContextStore object that can be used to interact with the FloodlightContext information created by BVS manager. |
Method Summary | |
---|---|
void |
addIndex(boolean perClass,
java.util.EnumSet<IDeviceService.DeviceField> keyFields)
Create an index over a set of fields. |
void |
addListener(IDeviceListener listener)
Adds a listener to listen for IDeviceManagerServices notifications |
void |
addSuppressAPs(long swId,
int port)
Specify points in the network where attachment points are not to be learned. |
IDevice |
findClassDevice(IEntityClass entityClass,
long macAddress,
java.lang.Short vlan,
java.lang.Integer ipv4Address)
Get 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)
Search for a device exactly matching the provided device fields. |
java.util.Collection<? extends IDevice> |
getAllDevices()
Get an unmodifiable collection view over all devices currently known. |
IDevice |
getDevice(java.lang.Long deviceKey)
Get the device with the given device key. |
java.util.Set<SwitchPort> |
getSuppressAPs()
|
java.util.Iterator<? extends IDevice> |
queryClassDevices(IEntityClass entityClass,
java.lang.Long macAddress,
java.lang.Short vlan,
java.lang.Integer ipv4Address,
java.lang.Long switchDPID,
java.lang.Integer switchPort)
Find 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)
Find devices that match the provided query. |
void |
removeSuppressAPs(long swId,
int port)
|
Field Detail |
---|
static final java.lang.String CONTEXT_SRC_DEVICE
static final java.lang.String CONTEXT_DST_DEVICE
static final java.lang.String CONTEXT_ORIG_DST_DEVICE
static final FloodlightContextStore<IDevice> fcStore
Method Detail |
---|
IDevice getDevice(java.lang.Long deviceKey)
deviceKey
- the key to search for
IDevice.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
IEntityClassifierService
will
be important in this search. All key fields MUST be supplied.
queryDevices()
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 port
IDevice
or null if no device is found.
java.lang.IllegalArgumentException
- if not all key fields of the
current IEntityClassifierService
are specified.IDeviceManager#setEntityClassifier(IEntityClassifierService)
IDevice findClassDevice(IEntityClass entityClass, long macAddress, java.lang.Short vlan, java.lang.Integer ipv4Address) throws java.lang.IllegalArgumentException
entityClass
- The entity class in which to perform the lookup.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 port
queryClassDevices(IEntityClass, Long,
Short, Integer, Long, Integer)
java.util.Iterator<? extends IDevice> queryClassDevices(IEntityClass entityClass, java.lang.Long macAddress, java.lang.Short vlan, java.lang.Integer ipv4Address, java.lang.Long switchDPID, java.lang.Integer switchPort)
entityClass
- The entity class in which to perform the querymacAddress
- The MAC addressvlan
- the VLANipv4Address
- the ipv4 addressswitchDPID
- the switch DPIDswitchPort
- the switch port
IDeviceService#queryClassDevices(Long,
Short, Integer, Long, Integer)
void addListener(IDeviceListener listener)
listener
- The listener that wants the notificationstype
- The type of the listenervoid addSuppressAPs(long swId, int port)
sw
- port
- void removeSuppressAPs(long swId, int port)
java.util.Set<SwitchPort> getSuppressAPs()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |