com.ibm.jusb.os
Class DefaultUsbDeviceOsImp

java.lang.Object
  extended by com.ibm.jusb.os.DefaultUsbDeviceOsImp
All Implemented Interfaces:
UsbDeviceOsImp

public class DefaultUsbDeviceOsImp
extends java.lang.Object
implements UsbDeviceOsImp

Default UsbDeviceOsImp implementation.

This is an optional default implementation that handles all methods. Those methods may be overridden by the implementation if desired. The implementation is not required to extend this class. All methods are implemented using the asyncSubmit(UsbControlIrpImp) method; this method, at a minimum, must be implemented in order to provide any actual functionality.

The default action for this class is to throw a UsbException for all submission methods.

Author:
Dan Streetman

Field Summary
static java.lang.String HOST_CONTROLLER_SUBMIT_STRING
           
static java.lang.String SUBMIT_STRING
           
 
Constructor Summary
DefaultUsbDeviceOsImp()
          Constructor.
DefaultUsbDeviceOsImp(java.lang.String submitString)
          Constructor.
 
Method Summary
 void asyncSubmit(java.util.List list)
          Asynchronously submit a List of UsbControlIrpImps.
 void asyncSubmit(UsbControlIrpImp usbControlIrpImp)
          Asynchronously submit a UsbControlIrpImp.
 void syncSubmit(java.util.List list)
          Synchronously submit a List of UsbControlIrpImps.
 void syncSubmit(UsbControlIrpImp usbControlIrpImp)
          Synchronously submit a UsbControlIrpImp.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUBMIT_STRING

public static final java.lang.String SUBMIT_STRING
See Also:
Constant Field Values

HOST_CONTROLLER_SUBMIT_STRING

public static final java.lang.String HOST_CONTROLLER_SUBMIT_STRING
See Also:
Constant Field Values
Constructor Detail

DefaultUsbDeviceOsImp

public DefaultUsbDeviceOsImp()
Constructor.


DefaultUsbDeviceOsImp

public DefaultUsbDeviceOsImp(java.lang.String submitString)
Constructor.

Parameters:
submitString - The String to be used in UsbExceptions thrown from a submission method.
Method Detail

syncSubmit

public void syncSubmit(UsbControlIrpImp usbControlIrpImp)
                throws UsbException
Synchronously submit a UsbControlIrpImp.

This method is implemented using asyncSubmit(UsbControlIrpImp).

Specified by:
syncSubmit in interface UsbDeviceOsImp
Parameters:
usbControlIrpImp - The UsbControlIrpImp.
Throws:
UsbException - If the submission is unsuccessful.

asyncSubmit

public void asyncSubmit(UsbControlIrpImp usbControlIrpImp)
                 throws UsbException
Asynchronously submit a UsbControlIrpImp.

This throws a UsbException with the specified string. The implementation should override (at least) this method.

Specified by:
asyncSubmit in interface UsbDeviceOsImp
Parameters:
usbControlIrpImp - The UsbControlIrpImp.
Throws:
UsbException - If the submission is unsucessful.

syncSubmit

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

This method is implemented using syncSubmit(UsbControlIrpImp). If an UsbException occurrs, it is thrown immediately and any remaining UsbControlIrpImps are not submitted nor modified.

Specified by:
syncSubmit in interface UsbDeviceOsImp
Parameters:
list - The List.
Throws:
UsbException - If the one (or more) submissions are unsuccessful (optional).

asyncSubmit

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

This method is implemented using asyncSubmit(UsbControlIrpImp). If an UsbException occurrs, it is thrown immediately and any remaining UsbControlIrpImps are not submitted nor modified.

Specified by:
asyncSubmit in interface UsbDeviceOsImp
Parameters:
list - The List.
Throws:
UsbException - If the one (or more) submissions are unsuccessful (optional).