com.ibm.jusb.os
Interface UsbDeviceOsImp

All Known Implementing Classes:
DefaultUsbDeviceOsImp

public interface UsbDeviceOsImp

Interface for Platform-specific implementation of UsbDevice.

All methods are synchronized in the Platform-Independent layer; the implementation does not need to make them Thread-safe.

Author:
Dan Streetman

Method Summary
 void asyncSubmit(java.util.List list)
          Asynchronously submit a List of UsbControlIrpImps.
 void asyncSubmit(UsbControlIrpImp controlUsbIrpImp)
          Asynchronously submit a UsbControlIrpImp.
 void syncSubmit(java.util.List list)
          Synchronously submit a List of UsbControlIrpImps.
 void syncSubmit(UsbControlIrpImp controlUsbIrpImp)
          Synchronously submit a UsbControlIrpImp.
 

Method Detail

syncSubmit

void syncSubmit(UsbControlIrpImp controlUsbIrpImp)
                throws UsbException
Synchronously submit a UsbControlIrpImp.

This will block until the UsbControlIrpImp has completed. The implementation should throw the UsbException if one occurs. The implementation must perform all actions as specified in the UsbControlIrpImp documentation.

Parameters:
controlUsbIrpImp - The UsbControlIrpImp.
Throws:
UsbException - If the submission is unsuccessful.

asyncSubmit

void asyncSubmit(UsbControlIrpImp controlUsbIrpImp)
                 throws UsbException
Asynchronously submit a UsbControlIrpImp.

This should return as soon as possible. The implementation must perform all actions specified in the UsbControlIrpImp's documentation. In addition, if the UsbControlIrpImp is not accepted for processing (i.e. before returning from this method), a UsbException should be thrown. Otherwise (i.e. after returning from this method) no UsbException can be thrown (but should be set on the UsbControlIrpImp).

Parameters:
controlUsbIrpImp - The UsbControlIrpImp.
Throws:
UsbException - If the submission was not accepted by the implementation.

syncSubmit

void syncSubmit(java.util.List list)
                throws UsbException
Synchronously submit a List of UsbControlIrpImps.

All items in the List will be UsbControlIrpImps. Every UsbControlIrpImp should be handled as if passed via single UsbControlIrpImp syncSubmit, with the only difference being an error for one of the UsbControlIrpImps does not require the implementation to throw a UsbException for the entire List. The implementation may, at its option, continue processing UsbControlIrpImps. In either case (return from the method or throw an UsbException), all UsbIrpImps must be handled as specified in the UsbIrpImp documentation, even if they are not processed.

Note that the implementation may call each UsbControlIrpImp's complete method as the UsbControlIrpImp completes or after processing all UsbControlIrpImps in the list.

Parameters:
list - The List.
Throws:
UsbException - If the one (or more) submissions are unsuccessful (optional).

asyncSubmit

void asyncSubmit(java.util.List list)
                 throws UsbException
Asynchronously submit a List of UsbControlIrpImps.

All items in the List will be UsbControlIrpImps. Every UsbControlIrpImp should be handled as if passed via single UsbControlIrpImp asyncSubmit, with the only difference being an error for one of the UsbControlIrpImps does not require the implementation to throw a UsbException for the entire List. The implementation may, at its option, continue processing UsbControlIrpImps. In either case (return from the method or throw an UsbException), all UsbIrpImps must be handled as specified in the UsbIrpImp documentation, even if they are not processed.

Note that the implementation may call each UsbControlIrpImp's complete method as the UsbControlIrpImp completes or after processing all UsbControlIrpImps in the list.

Parameters:
list - The List.
Throws:
UsbException - If the one (or more) submissions are unsuccessful (optional).