@Beta public abstract class ForwardingDeviceService extends java.lang.Object implements DeviceService
Modifier | Constructor and Description |
---|---|
protected |
ForwardingDeviceService(DeviceService delegate) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(DeviceListener listener)
Adds the specified listener.
|
protected DeviceService |
delegate() |
int |
getAvailableDeviceCount()
Returns the number of currently available devices known to the system.
|
java.lang.Iterable<Device> |
getAvailableDevices()
Returns an iterable collection of all devices
currently available to the system.
|
java.lang.Iterable<Device> |
getAvailableDevices(Device.Type type)
Returns an iterable collection of all devices currently available to the system by device type.
|
Device |
getDevice(DeviceId deviceId)
Returns the device with the specified identifier.
|
int |
getDeviceCount()
Returns the number of infrastructure devices known to the system.
|
java.lang.Iterable<Device> |
getDevices()
Returns a collection of the currently known infrastructure
devices.
|
java.lang.Iterable<Device> |
getDevices(Device.Type type)
Returns a collection of the currently known infrastructure
devices by device type.
|
Port |
getPort(DeviceId deviceId,
PortNumber portNumber)
Returns the port with the specified number and hosted by the given device.
|
java.util.List<PortStatistics> |
getPortDeltaStatistics(DeviceId deviceId)
Returns the list of port delta statistics associated with the device.
|
java.util.List<Port> |
getPorts(DeviceId deviceId)
Returns the list of ports associated with the device.
|
java.util.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.
|
boolean |
isAvailable(DeviceId deviceId)
Indicates whether or not the device is presently online and available.
|
java.lang.String |
localStatus(DeviceId deviceId)
Indicates how long ago the device connected or disconnected from this
controller instance.
|
void |
removeListener(DeviceListener listener)
Removes the specified listener.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDeltaStatisticsForPort, getPort, getStatisticsForPort
protected ForwardingDeviceService(DeviceService delegate)
protected final DeviceService delegate()
public void addListener(DeviceListener listener)
ListenerService
addListener
in interface ListenerService<DeviceEvent,DeviceListener>
listener
- listener to be addedpublic void removeListener(DeviceListener listener)
ListenerService
removeListener
in interface ListenerService<DeviceEvent,DeviceListener>
listener
- listener to be removedpublic int getDeviceCount()
DeviceService
getDeviceCount
in interface DeviceService
public int getAvailableDeviceCount()
DeviceService
getAvailableDeviceCount
in interface DeviceService
public java.lang.Iterable<Device> getDevices()
DeviceService
getDevices
in interface DeviceService
public java.lang.Iterable<Device> getDevices(Device.Type type)
DeviceService
getDevices
in interface DeviceService
type
- device typepublic java.lang.Iterable<Device> getAvailableDevices()
DeviceService
getAvailableDevices
in interface DeviceService
public java.lang.Iterable<Device> getAvailableDevices(Device.Type type)
DeviceService
getAvailableDevices
in interface DeviceService
type
- device typepublic Device getDevice(DeviceId deviceId)
DeviceService
getDevice
in interface DeviceService
deviceId
- device identifierpublic MastershipRole getRole(DeviceId deviceId)
DeviceService
getRole
in interface DeviceService
deviceId
- device identifierpublic java.util.List<Port> getPorts(DeviceId deviceId)
DeviceService
getPorts
in interface DeviceService
deviceId
- device identifierpublic java.util.List<PortStatistics> getPortStatistics(DeviceId deviceId)
DeviceService
getPortStatistics
in interface DeviceService
deviceId
- device identifierpublic java.util.List<PortStatistics> getPortDeltaStatistics(DeviceId deviceId)
DeviceService
getPortDeltaStatistics
in interface DeviceService
deviceId
- device identifierpublic Port getPort(DeviceId deviceId, PortNumber portNumber)
DeviceService
getPort
in interface DeviceService
deviceId
- device identifierportNumber
- port numberpublic boolean isAvailable(DeviceId deviceId)
DeviceService
isAvailable
in interface DeviceService
deviceId
- device identifierpublic java.lang.String localStatus(DeviceId deviceId)
DeviceService
localStatus
in interface DeviceService
deviceId
- device identifier