Package org.onosproject.common.net
Class AbstractDeviceProvider
- java.lang.Object
-
- org.onosproject.net.provider.AbstractProvider
-
- org.onosproject.common.net.AbstractDeviceProvider
-
- All Implemented Interfaces:
DeviceProvider
,Provider
public abstract class AbstractDeviceProvider extends AbstractProvider implements DeviceProvider
Base device provider capable of engagingDeviceDescriptionDiscovery
driver behaviour to discover device and port details.Assumes that derived classes will provide code to learn/generate device identifier. Also assumes that derived classes will either obtain the primordial device information sufficient to locate the correct driver, or that they will know which driver should be used, e.g. from network configuration.
-
-
Field Summary
Fields Modifier and Type Field Description protected DriverService
driverService
protected org.slf4j.Logger
log
protected DeviceProviderRegistry
providerRegistry
protected DeviceProviderService
providerService
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDeviceProvider(ProviderId id)
Creates a provider with the supplied identifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activate()
protected void
deactivate()
protected void
discoverDevice(DriverHandler handler)
Discovers the device details using the device discovery behaviour of the supplied driver handler context for interacting with a specific device.-
Methods inherited from class org.onosproject.net.provider.AbstractProvider
id
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.onosproject.net.device.DeviceProvider
changePortState, isAvailable, isReachable, roleChanged, triggerDisconnect, triggerProbe
-
-
-
-
Field Detail
-
log
protected final org.slf4j.Logger log
-
providerRegistry
protected DeviceProviderRegistry providerRegistry
-
driverService
protected DriverService driverService
-
providerService
protected DeviceProviderService providerService
-
-
Constructor Detail
-
AbstractDeviceProvider
protected AbstractDeviceProvider(ProviderId id)
Creates a provider with the supplied identifier.- Parameters:
id
- provider id
-
-
Method Detail
-
activate
protected void activate()
-
deactivate
protected void deactivate()
-
discoverDevice
protected void discoverDevice(DriverHandler handler)
Discovers the device details using the device discovery behaviour of the supplied driver handler context for interacting with a specific device.- Parameters:
handler
- driver handler context
-
-