public abstract class AbstractDriverService extends Object implements DriverService, RegistrationListener<CommPort>
Constructor and Description |
---|
AbstractDriverService() |
Modifier and Type | Method and Description |
---|---|
protected abstract Controller |
create(CommPort port) |
protected ControllerListener |
createControllerListener()
Create the controllerListener.
|
void |
deviceRegistered(RegistrationEvent<CommPort> event)
This method is called when a new device is registered and if it is allowed to be notified of events on the registered event class.
|
void |
deviceUnregistered(RegistrationEvent<CommPort> event)
This method is called when a new device is unregistered and if it is allowed to be notified of events on the registered event class.
|
void |
start()
Starts the driver.
|
void |
stop()
Stops the driver.
|
protected abstract Controller create(CommPort port)
protected ControllerListener createControllerListener()
public void deviceRegistered(RegistrationEvent<CommPort> event)
RegistrationListener
deviceRegistered
in interface RegistrationListener<CommPort>
event
- the device registration event.public void deviceUnregistered(RegistrationEvent<CommPort> event)
RegistrationListener
deviceUnregistered
in interface RegistrationListener<CommPort>
event
- the device unregistration event.public void start()
DriverService
start
in interface DriverService
public void stop()
DriverService
stop
in interface DriverService