class Udev
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
private java.nio.ByteBuffer |
buffer |
private long |
fd |
private static Udev |
instance |
private UdevListener[] |
listeners |
private java.lang.Thread |
thread |
Modifier | Constructor and Description |
---|---|
private |
Udev()
Creates a new Udev object
|
Modifier and Type | Method and Description |
---|---|
private void |
_close(long fd) |
private int |
_getPropertiesLength(java.nio.ByteBuffer buffer) |
private int |
_getPropertiesOffset(java.nio.ByteBuffer buffer) |
private long |
_open() |
private int |
_readEvent(long fd,
java.nio.ByteBuffer buffer) |
(package private) void |
addListener(UdevListener listener) |
(package private) void |
close()
Closes the udev monitor connection
|
(package private) static Udev |
getInstance()
Gets the singleton Udev object
|
private java.util.Map<java.lang.String,java.lang.String> |
readEvent()
Reads data from the udev monitor.
|
void |
run() |
private static Udev instance
private long fd
private java.nio.ByteBuffer buffer
private java.lang.Thread thread
private UdevListener[] listeners
private Udev() throws java.io.IOException
java.io.IOException
static Udev getInstance()
void addListener(UdevListener listener)
private long _open() throws java.io.IOException
java.io.IOException
private int _readEvent(long fd, java.nio.ByteBuffer buffer) throws java.io.IOException
java.io.IOException
private void _close(long fd)
private int _getPropertiesOffset(java.nio.ByteBuffer buffer)
private int _getPropertiesLength(java.nio.ByteBuffer buffer)
public void run()
run
in interface java.lang.Runnable
private java.util.Map<java.lang.String,java.lang.String> readEvent() throws java.io.IOException
java.io.IOException
void close()