No, no such API exists. You will need to implement a driver for USB
events and devices yourself.
On Linux, it is possible to incorporate DBus-Java into a bundle and
talk to the HAL daemon for events. HAL has device nodes specifically
for USB devices, storage devices and also for "volumes" that appear on
a disk. It has a specific interface (org.freedesktop.Hal.Device.Volume
IIRC) for volume devices that lets you mount/unmount and lock the
volume.
On Windows, you might be able to write something that talks to the
Windows driver layer.
Cheers
Chris
On 16/02/2010, at 10:58 AM, Ikuo Yamasaki wrote:
Hi all,
As far as I know, there is no OSGi Service API for USB Device (like
UPnP
Device Service Spec.), while Device Access Spec. mentions about USB
Device, just an example.
I wonder if there is any common way to handle USB Device of
storage device (USB disk) in OSGi.
What the client bundle needs to do is
- notified events of attachement or detachement of a USB disk.
- with the knowledge of the file path of the top node of the USB
disk.
Best regards,
---------------------
NTT Cyber Solutions Laboratories
Ikuo YAMASAKI
E-mail: [email protected]
TEL +81-46-859-8537 FAX +81-46-855-1282
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
--------
Christopher Armstrong
[email protected]
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev