public interface DeviceProvider extends Provider
| Modifier and Type | Method and Description | 
|---|---|
void | 
changePortState(DeviceId deviceId,
               PortNumber portNumber,
               boolean enable)
Administratively enables or disables a port. 
 | 
default boolean | 
isAvailable(DeviceId deviceId)
Checks the availability of the device from the provider perspective. 
 | 
boolean | 
isReachable(DeviceId deviceId)
Checks the reachability (connectivity) of a device from this provider. 
 | 
void | 
roleChanged(DeviceId deviceId,
           MastershipRole newRole)
Notifies the provider of a mastership role change for the specified
 device as decided by the core. 
 | 
default void | 
triggerDisconnect(DeviceId deviceId)
Administratively triggers 'disconnection' from the device. 
 | 
void | 
triggerProbe(DeviceId deviceId)
Triggers an asynchronous probe of the specified device, intended to
 determine whether the device is present or not. 
 | 
void triggerProbe(DeviceId deviceId)
DeviceProviderService.deviceConnected(org.onosproject.net.DeviceId, org.onosproject.net.device.DeviceDescription) )} or
 DeviceProviderService.deviceDisconnected(org.onosproject.net.DeviceId)
 at some later point in time.deviceId - ID of device to be probedvoid roleChanged(DeviceId deviceId, MastershipRole newRole)
deviceId - device identifiernewRole - newly determined mastership roleboolean isReachable(DeviceId deviceId)
Implementations are encouraged to check for reachability by using only internal provider state, i.e., without blocking execution.
deviceId - device identifierdefault boolean isAvailable(DeviceId deviceId)
Implementations are encouraged to check for availability by using only internal provider state, i.e., without blocking execution.
deviceId - device identifiervoid changePortState(DeviceId deviceId, PortNumber portNumber, boolean enable)
deviceId - device identifierportNumber - port numberenable - true if port is to be enabled, false to disabledefault void triggerDisconnect(DeviceId deviceId)
DeviceProviderService.deviceDisconnected(org.onosproject.net.DeviceId)
 if the device was presently 'connected' and
 DeviceProviderService.deviceConnected(org.onosproject.net.DeviceId, org.onosproject.net.device.DeviceDescription)
 at some later point in time if the device is available and continues to
 be permitted to reconnect or if the provider continues to discover it.deviceId - device identifier