Class UdevService
- Since:
- 1
- Version:
- 10
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddGlobalMonitor(UdevSubsystemMonitor monitor) Add a subsystem monitor to all nodes that attach UdevAdapters to this node.voidaddMonitor(NodeId nodeId, UdevSubsystemMonitor monitor) Add a subsystem monitor to the specified node.voidaddMonitor(UdevSubsystemMonitor monitor) Add a subsystem monitor to the local node.voidremoveGlobalMonitor(UdevSubsystemMonitor monitor) Remove a subsystem monitor from the global monitor list.voidremoveMonitor(NodeId nodeId, UdevSubsystemMonitor monitor) Remove a subsystem monitor from the specified node.voidremoveMonitor(UdevSubsystemMonitor monitor) Remove a subsystem monitor from the local node.voidremoveOwner(UdevDeviceOwner owner) Release all devices claimed by the owner.
-
Method Details
-
removeOwner
Release all devices claimed by the owner.- Since:
- 1
-
addGlobalMonitor
Add a subsystem monitor to all nodes that attach UdevAdapters to this node. This allows the monitor to detect device add/remove events.In a multi-node environment, it is possible to run java on more than one node in which case each node running java will likely have
udevAdapterpoint to itself for local node use. In this configuration, a global monitor will not detect any events from other nodes as the devices are being managed locally on that node. In the case where one node runs java and another doesn't, but the node running java wants to use devices on the other node, it is possible to runudevAdapteron the non-java node such that it connects to the java node, resulting in the java node having multiple adapters connected. In this case, a global monitor will process devices from both nodes.Not all subsystems make sense to be globally monitored. For example, storage devices can be detected and event mounted via
udevAdapter, but as they may be on another node, java cannot access those remote filesystems directly.Adding a monitor may result in immediate device events. In the case the callbacks will come from the calling thread. Application logic should be designed to handle this.
- Parameters:
monitor- the monitor to attach- Since:
- 10
-
removeGlobalMonitor
Remove a subsystem monitor from the global monitor list. This will remove the monitor from all associated nodes. This will not generate any device events. In the event that remove device events are required, remove all the matchers from the monitor before removing the monitor itself.- Parameters:
monitor- the monitor to remove- Since:
- 10
-
addMonitor
Add a subsystem monitor to the local node. This allows the monitor to detect device add/remove events.Adding a monitor may result in immediate device events. In the case the callbacks will come from the calling thread. Application logic should be designed to handle this.
- Parameters:
monitor- the monitor to attach- Since:
- 10
-
removeMonitor
Remove a subsystem monitor from the local node. This will not generate any device events. In the event that remove device events are required, remove all the matchers from the monitor before removing the monitor itself.- Parameters:
monitor- the monitor to remove- Since:
- 10
-
addMonitor
Add a subsystem monitor to the specified node. This allows the monitor to detect device add/remove events. This will only generate events ifudevAdapteron the node is configured to connect to this node.Adding a monitor may result in immediate device events. In the case the callbacks will come from the calling thread. Application logic should be designed to handle this.
- Parameters:
monitor- the monitor to attach- Since:
- 10
-
removeMonitor
Remove a subsystem monitor from the specified node. This will not generate any device events. In the event that remove device events are required, remove all the matchers from the monitor before removing the monitor itself.- Parameters:
monitor- the monitor to remove- Since:
- 10
-