Class SerialService
java.lang.Object
com.tccc.kos.commons.util.ready.ReadyBean
com.tccc.kos.commons.core.service.AbstractService
com.tccc.kos.core.service.udev.serial.SerialService
- All Implemented Interfaces:
CtxEventListener,ContextHandleAware,HandleAware,Ready,ReadyAndReadyListener,ReadyListener
Service that manages serial devices.
- Since:
- 1.0
- Version:
- 2023-09-18
-
Method Summary
Modifier and TypeMethodDescriptionvoidclaimDevice(SerialDevice device) AskSerialServiceto claim ownership of the device.voidRestart the matching process for all pending devices.Methods inherited from class com.tccc.kos.commons.core.service.AbstractService
getHandle, getHandlePrefixMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tccc.kos.commons.core.context.CtxEventListener
onCtxAutowiringCompleted, onCtxDestroyed, onCtxPhaseCompletedMethods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware
addHandleChild, getName, getPathMethods inherited from interface com.tccc.kos.commons.util.ready.ReadyAndReadyListener
onBeanReady, onDependenciesReadyMethods inherited from interface com.tccc.kos.commons.util.ready.ReadyListener
onDependenciesGroupReady
-
Method Details
-
restartMatching
public void restartMatching()Restart the matching process for all pending devices. -
claimDevice
AskSerialServiceto claim ownership of the device. This is useful when dealing with multi-port serial devices that are part of the same usb device. ASerialAdapterFactorycan find the first port, call this method to claim it, keep a reference to it, and then when the other port appears, return an adapter. This will result in both devices being owned bySerialService.
-