public interface DeviceService extends ListenerService<DeviceEvent,DeviceListener>
Modifier and Type | Method and Description |
---|---|
default int |
getAvailableDeviceCount()
Returns the number of currently available devices known to the system.
|
Iterable<Device> |
getAvailableDevices()
Returns an iterable collection of all devices
currently available to the system.
|
Iterable<Device> |
getAvailableDevices(Device.Type type)
Returns an iterable collection of all devices currently available to the system by device type.
|
default PortStatistics |
getDeltaStatisticsForPort(DeviceId deviceId,
PortNumber portNumber)
Returns the port specific port delta statistics associated with the device and port.
|
Device |
getDevice(DeviceId deviceId)
Returns the device with the specified identifier.
|
int |
getDeviceCount()
Returns the number of infrastructure devices known to the system.
|
Iterable<Device> |
getDevices()
Returns a collection of the currently known infrastructure
devices.
|
Iterable<Device> |
getDevices(Device.Type type)
Returns a collection of the currently known infrastructure
devices by device type.
|
long |
getLastUpdatedInstant(DeviceId deviceId)
Indicates the time at which the given device connected or disconnected
from this controller instance.
|
default Port |
getPort(ConnectPoint cp)
Returns the port with the specified connect point.
|
Port |
getPort(DeviceId deviceId,
PortNumber portNumber)
Returns the port with the specified number and hosted by the given device.
|
List<PortStatistics> |
getPortDeltaStatistics(DeviceId deviceId)
Returns the list of port delta statistics associated with the device.
|
List<Port> |
getPorts(DeviceId deviceId)
Returns the list of ports associated with the device.
|
List<PortStatistics> |
getPortStatistics(DeviceId deviceId)
Returns the list of port statistics associated with the device.
|
MastershipRole |
getRole(DeviceId deviceId)
Returns the current mastership role for the specified device.
|
default PortStatistics |
getStatisticsForPort(DeviceId deviceId,
PortNumber portNumber)
Returns the port specific port statistics associated with the device and port.
|
boolean |
isAvailable(DeviceId deviceId)
Indicates whether or not the device is presently online and available.
|
String |
localStatus(DeviceId deviceId)
Indicates how long ago the device connected or disconnected from this
controller instance.
|
addListener, removeListener
int getDeviceCount()
default int getAvailableDeviceCount()
Iterable<Device> getDevices()
Iterable<Device> getDevices(Device.Type type)
type
- device typeIterable<Device> getAvailableDevices()
Iterable<Device> getAvailableDevices(Device.Type type)
type
- device typeDevice getDevice(DeviceId deviceId)
deviceId
- device identifierMastershipRole getRole(DeviceId deviceId)
deviceId
- device identifierList<Port> getPorts(DeviceId deviceId)
deviceId
- device identifierList<PortStatistics> getPortStatistics(DeviceId deviceId)
deviceId
- device identifierList<PortStatistics> getPortDeltaStatistics(DeviceId deviceId)
deviceId
- device identifierdefault PortStatistics getStatisticsForPort(DeviceId deviceId, PortNumber portNumber)
deviceId
- device identifierportNumber
- port identifierdefault PortStatistics getDeltaStatisticsForPort(DeviceId deviceId, PortNumber portNumber)
deviceId
- device identifierportNumber
- port identifierPort getPort(DeviceId deviceId, PortNumber portNumber)
deviceId
- device identifierportNumber
- port numberdefault Port getPort(ConnectPoint cp)
cp
- connect pointboolean isAvailable(DeviceId deviceId)
deviceId
- device identifierString localStatus(DeviceId deviceId)
deviceId
- device identifierlong getLastUpdatedInstant(DeviceId deviceId)
deviceId
- device identifier