Package org.onosproject.net.driver
Class DefaultDriverHandler
- java.lang.Object
 - 
- org.onosproject.net.driver.DefaultDriverHandler
 
 
- 
- All Implemented Interfaces:
 DriverHandler
public class DefaultDriverHandler extends Object implements DriverHandler
Default implementation of driver handler. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected static ServiceDirectoryserviceDirectory 
- 
Constructor Summary
Constructors Constructor Description DefaultDriverHandler(DriverData data)Creates new driver handler with the attached driver data. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Behaviour>
Tbehaviour(Class<T> behaviourClass)Returns the specified facet of behaviour to interact with the device.DriverDatadata()Returns the device driver data.Driverdriver()Returns the parent device driver.<T> Tget(Class<T> serviceClass)Returns the reference to the implementation of the specified service.StringtoString()- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface org.onosproject.net.driver.DriverHandler
hasBehaviour 
 - 
 
 - 
 
- 
- 
Field Detail
- 
serviceDirectory
protected static ServiceDirectory serviceDirectory
 
 - 
 
- 
Constructor Detail
- 
DefaultDriverHandler
public DefaultDriverHandler(DriverData data)
Creates new driver handler with the attached driver data.- Parameters:
 data- driver data to attach
 
 - 
 
- 
Method Detail
- 
driver
public Driver driver()
Description copied from interface:DriverHandlerReturns the parent device driver.- Specified by:
 driverin interfaceDriverHandler- Returns:
 - device driver
 
 
- 
data
public DriverData data()
Description copied from interface:DriverHandlerReturns the device driver data.- Specified by:
 datain interfaceDriverHandler- Returns:
 - device driver data
 
 
- 
behaviour
public <T extends Behaviour> T behaviour(Class<T> behaviourClass)
Description copied from interface:DriverHandlerReturns the specified facet of behaviour to interact with the device.- Specified by:
 behaviourin interfaceDriverHandler- Type Parameters:
 T- type of behaviour- Parameters:
 behaviourClass- behaviour class- Returns:
 - behaviour
 
 
- 
get
public <T> T get(Class<T> serviceClass)
Description copied from interface:DriverHandlerReturns the reference to the implementation of the specified service. Provides access to run-time context.- Specified by:
 getin interfaceDriverHandler- Type Parameters:
 T- type of service- Parameters:
 serviceClass- service class- Returns:
 - service implementation
 
 
 - 
 
 -