|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sentilla.system.Drivers
public class Drivers
Provides a registry of all valid drivers for the current platform. On initialization, a platform registers all the drivers it provides. User applications may also register their own driver implementations.
Driver
,
DriverAdapter
Field Summary | |
---|---|
protected static Driver |
m_driver_head
The head of the driver queue. |
Constructor Summary | |
---|---|
Drivers()
|
Method Summary | ||
---|---|---|
static void |
addDriver(Driver new_driver)
Add a driver to the list of registered drivers. |
|
static
|
getDriver(String name,
Class<D> driverClass)
Get a driver by name and type. |
|
static Driver |
getFirstDriver()
Get the first driver in the set of registered drivers. |
|
static void |
removeDriver(Driver driver)
Remove a driver to the list of registered drivers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Driver m_driver_head
Constructor Detail |
---|
public Drivers()
Method Detail |
---|
public static <D extends Driver> D getDriver(String name, Class<D> driverClass)
D
- The type of the drivername
- The name that represents the driverdriverClass
- A class representation of type D, such as LedsDriver.class
NoSuchDriverException
- if no driver is found that implements the given classpublic static void addDriver(Driver new_driver)
new_driver
- An instance of the new driverpublic static Driver getFirstDriver()
public static void removeDriver(Driver driver)
driver
- instance of the driver to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |