public interface DeviceService
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(DeviceListener listener)
Adds the specified device listener.
|
Iterable<Device> |
getAvailableDevices()
Returns an iterable collection of all devices
currently available to the system.
|
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.
|
Port |
getPort(DeviceId deviceId,
PortNumber portNumber)
Returns the port with the specified number and hosted by the given device.
|
List<Port> |
getPorts(DeviceId deviceId)
Returns the list of ports associated with the device.
|
MastershipRole |
getRole(DeviceId deviceId)
Returns the current mastership role for the specified device.
|
boolean |
isAvailable(DeviceId deviceId)
Indicates whether or not the device is presently online and available.
|
void |
removeListener(DeviceListener listener)
Removes the specified device listener.
|
int getDeviceCount()
Iterable<Device> getDevices()
Iterable<Device> getAvailableDevices()
Device getDevice(DeviceId deviceId)
deviceId - device identifierMastershipRole getRole(DeviceId deviceId)
deviceId - device identifierList<Port> getPorts(DeviceId deviceId)
deviceId - device identifierPort getPort(DeviceId deviceId, PortNumber portNumber)
deviceId - device identifierportNumber - port numberboolean isAvailable(DeviceId deviceId)
deviceId - device identifiervoid addListener(DeviceListener listener)
listener - device listenervoid removeListener(DeviceListener listener)
listener - device listenerCopyright © 2015. All rights reserved.