Top Description Fields Constructors Methods
com.sun.glass.ui.monocle

pack-priv Class Udev

extends Object
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable
Imports
java.io.IOException, java.nio.ByteBuffer, .ByteOrder, java.util.Arrays, .HashMap, .Map

Udev connects to the udev system to get updates on sysfs devices that are connected, disconnected and modified.

Field Summary

Modifier and TypeField and Description
private ByteBuffer
private long
private static Udev
private UdevListener[]
private Thread

Constructor Summary

AccessConstructor and Description
private
Udev()

Creates a new Udev object

Method Summary

Modifier and TypeMethod and Description
private native void
_close(long fd)

private native int
private native int
private native long
private native int
_readEvent(long fd, ByteBuffer buffer)

pack-priv synchronized void
pack-priv synchronized void
close()

Closes the udev monitor connection

pack-priv static synchronized Udev
getInstance()

Gets the singleton Udev object

private Map<String, String>
readEvent()

Reads data from the udev monitor.

public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferback to summary
private ByteBuffer buffer
fdback to summary
private long fd
instanceback to summary
private static Udev instance
listenersback to summary
private UdevListener[] listeners
threadback to summary
private Thread thread

Constructor Detail

Udevback to summary
private Udev() throws IOException

Creates a new Udev object

Method Detail

_closeback to summary
private native void _close(long fd)
_getPropertiesLengthback to summary
private native int _getPropertiesLength(ByteBuffer buffer)
_getPropertiesOffsetback to summary
private native int _getPropertiesOffset(ByteBuffer buffer)
_openback to summary
private native long _open() throws IOException
_readEventback to summary
private native int _readEvent(long fd, ByteBuffer buffer) throws IOException
addListenerback to summary
pack-priv synchronized void addListener(UdevListener listener)
closeback to summary
pack-priv synchronized void close()

Closes the udev monitor connection

getInstanceback to summary
pack-priv static synchronized Udev getInstance()

Gets the singleton Udev object

readEventback to summary
private Map<String, String> readEvent() throws IOException

Reads data from the udev monitor. Blocks until data is available

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override