|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.jusb.os.DefaultUsbPipeOsImp
public class DefaultUsbPipeOsImp
Default UsbPipeOsImp implementation.
This is an optional class that handles all methods. Those methods may be overridden by the implementation if desired. The implementation does not have to extend this abstract class. The default behavior is to throw an UsbException for all methods.
| Field Summary | |
|---|---|
static java.lang.String |
HOST_CONTROLLER_OPEN_STRING
|
static java.lang.String |
HOST_CONTROLLER_SUBMIT_STRING
|
static java.lang.String |
OPEN_STRING
|
static java.lang.String |
SUBMIT_STRING
|
| Constructor Summary | |
|---|---|
DefaultUsbPipeOsImp()
Constructor. |
|
DefaultUsbPipeOsImp(boolean open)
Constructor. |
|
DefaultUsbPipeOsImp(java.lang.String open,
java.lang.String submit)
Constructor. |
|
| Method Summary | |
|---|---|
void |
abortAllSubmissions()
Stop all submissions in progress. |
void |
asyncSubmit(java.util.List list)
Asynchronously submits a List of UsbIrpImps to the platform implementation. |
void |
asyncSubmit(UsbIrpImp irp)
Asynchronously submits this UsbIrpImp to the platform implementation. |
void |
close()
Close this pipe. |
void |
open()
Open this pipe. |
void |
syncSubmit(java.util.List list)
Synchronously submits a List of UsbIrpImps to the platform implementation. |
void |
syncSubmit(UsbIrpImp irp)
Synchronously submits this UsbIrpImp to the platform implementation. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String OPEN_STRING
public static final java.lang.String SUBMIT_STRING
public static final java.lang.String HOST_CONTROLLER_OPEN_STRING
public static final java.lang.String HOST_CONTROLLER_SUBMIT_STRING
| Constructor Detail |
|---|
public DefaultUsbPipeOsImp()
This defaults to not allow opening (or use, obviously).
public DefaultUsbPipeOsImp(java.lang.String open,
java.lang.String submit)
open - The String to use in UsbExceptions thrown in open().submit - The String to use in UsbExceptions thrown in submit methods.public DefaultUsbPipeOsImp(boolean open)
If this is true, opening is allowed.
open - If this should allow opening.| Method Detail |
|---|
public void open()
throws UsbException
If allowOpen is true, this does nothing, otherwise
this throws UsbException using the String specified by getOpenString.
The implementation can override this method if appropriate.
open in interface UsbPipeOsImpUsbException - If allowOpen is false.public void close()
By default, this does nothing. The implementation can override this method if appropriate.
close in interface UsbPipeOsImp
public void syncSubmit(UsbIrpImp irp)
throws UsbException
This is implemented using asyncSubmit(UsbIrpImp).
syncSubmit in interface UsbPipeOsImpirp - the UsbIrpImp to use for this submission.
UsbException - If the data transfer was unsuccessful.
public void asyncSubmit(UsbIrpImp irp)
throws UsbException
By default, this throws UsbException with the String defined by getSubmitString.
The implementation should override (at least) this method.
asyncSubmit in interface UsbPipeOsImpirp - the UsbIrpImp to use for this submission.
UsbException - If the initial submission was unsuccessful.
public void syncSubmit(java.util.List list)
throws UsbException
This is implemented using syncSubmit(UsbIrpImp).
If any UsbException occurrs, it is thrown immediately and no further UsbIrpImps are submitted nor modified.
syncSubmit in interface UsbPipeOsImplist - the UsbIrpImps to use for this submission.
UsbException - If one of the UsbIrpImps failed.
public void asyncSubmit(java.util.List list)
throws UsbException
This is implemented using asyncSubmit(UsbIrpImp).
If any UsbException occurrs, it is thrown immediately and no further UsbIrpImps are submitted or modified.
asyncSubmit in interface UsbPipeOsImplist - The List of UsbIrpImps.
UsbException - If one of the UsbIrpImps was not accepted by the implementation.public void abortAllSubmissions()
By default, this does nothing. The implementation should override this method.
abortAllSubmissions in interface UsbPipeOsImp
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||