Class DefaultDriverHandler

    • Field Detail

      • serviceDirectory

        protected static org.onlab.osgi.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: DriverHandler
        Returns the parent device driver.
        Specified by:
        driver in interface DriverHandler
        Returns:
        device driver
      • behaviour

        public <T extends Behaviour> T behaviour​(Class<T> behaviourClass)
        Description copied from interface: DriverHandler
        Returns the specified facet of behaviour to interact with the device.
        Specified by:
        behaviour in interface DriverHandler
        Type Parameters:
        T - type of behaviour
        Parameters:
        behaviourClass - behaviour class
        Returns:
        behaviour
      • get

        public <T> T get​(Class<T> serviceClass)
        Description copied from interface: DriverHandler
        Returns the reference to the implementation of the specified service. Provides access to run-time context.
        Specified by:
        get in interface DriverHandler
        Type Parameters:
        T - type of service
        Parameters:
        serviceClass - service class
        Returns:
        service implementation