![JAR search and dependency download from the Maven repository](/logo.png)
org.usb4java.javax.ControlIrpQueue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of usb4java-javax Show documentation
Show all versions of usb4java-javax Show documentation
Extension for usb4java which implements javax.usb (JSR-80).
/*
* Copyright (C) 2011 Klaus Reimer
* See LICENSE.md for licensing information.
*/
package org.usb4java.javax;
import javax.usb.UsbControlIrp;
import javax.usb.UsbException;
import javax.usb.UsbIrp;
import javax.usb.event.UsbDeviceDataEvent;
/**
* A queue for USB control I/O request packets.
*
* @author Klaus Reimer ([email protected])
*/
final class ControlIrpQueue extends AbstractIrpQueue
{
/** The USB device listener list. */
private final DeviceListenerList listeners;
/**
* Constructor.
*
* @param device
* The USB device.
* @param listeners
* The USB device listener list.
*/
ControlIrpQueue(final AbstractDevice device,
final DeviceListenerList listeners)
{
super(device);
this.listeners = listeners;
}
@Override
protected void processIrp(final UsbControlIrp irp) throws UsbException
{
processControlIrp(irp);
}
@Override
protected void finishIrp(final UsbIrp irp)
{
this.listeners.dataEventOccurred(new UsbDeviceDataEvent(
getDevice(), (UsbControlIrp) irp));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy