|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.usb.util.DefaultUsbIrp
com.ibm.jusb.UsbIrpImp
public class UsbIrpImp
UsbIrp implementation.
If the user provided their own UsbIrp implementation, then the UsbPipeImp will 'wrap' their
implementation with this UsbIrpImp by setting the local
UsbIrp. If this has a local UsbIrp when it is
complete, this will set the proper fields on the wrapped UsbIrp.
| Nested Class Summary | |
|---|---|
static interface |
UsbIrpImp.UsbIrpImpListener
|
| Field Summary | |
|---|---|
protected boolean |
createShortPacketException
|
protected UsbIrp |
usbIrp
|
protected UsbIrpImp.UsbIrpImpListener |
usbIrpImpListener
|
| Fields inherited from class javax.usb.util.DefaultUsbIrp |
|---|
acceptShortPacket, actualLength, complete, data, length, offset, usbException |
| Constructor Summary | |
|---|---|
UsbIrpImp()
Constructor. |
|
UsbIrpImp(UsbIrp irp)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
checkShortPacketException()
If createShortPacketException is true, this will check for a short packet condition. |
static void |
checkUsbIrp(UsbIrp irp)
Check the specified UsbIrp. |
void |
complete()
Complete this submission. |
protected void |
completeUsbIrp()
If there is a wrapped UsbIrp, set its fields and complete it. |
UsbIrp |
getUsbIrp()
Get the UsbIrp this is wrapping. |
UsbIrpImp.UsbIrpImpListener |
getUsbIrpImpListener()
Get the UsbIrpImpListener. |
boolean |
hasUsbIrp()
If this UsbIrpImp has a wrapped UsbIrp. |
void |
setCreateShortPacketException(boolean setting)
This should be set by the UsbPipeImp or UsbDeviceImp if this UsbIrpImp should check/set ShortPacketExceptions. |
void |
setUsbIrp(UsbIrp irp)
Set the UsbIrp to wrap. |
void |
setUsbIrpImpListener(UsbIrpImp.UsbIrpImpListener listener)
Set the UsbIrpImpListener. |
| Methods inherited from class javax.usb.util.DefaultUsbIrp |
|---|
getAcceptShortPacket, getActualLength, getData, getLength, getOffset, getUsbException, isComplete, isUsbException, setAcceptShortPacket, setActualLength, setComplete, setData, setData, setLength, setOffset, setUsbException, waitUntilComplete, waitUntilComplete |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.usb.UsbIrp |
|---|
getAcceptShortPacket, getActualLength, getData, getLength, getOffset, getUsbException, isComplete, isUsbException, setAcceptShortPacket, setActualLength, setComplete, setData, setData, setLength, setOffset, setUsbException, waitUntilComplete, waitUntilComplete |
| Field Detail |
|---|
protected UsbIrp usbIrp
protected UsbIrpImp.UsbIrpImpListener usbIrpImpListener
protected boolean createShortPacketException
| Constructor Detail |
|---|
public UsbIrpImp()
public UsbIrpImp(UsbIrp irp)
irp - The UsbIrp this should wrap.| Method Detail |
|---|
public void complete()
The order of events must be as follows:
complete in interface UsbIrpcomplete in class DefaultUsbIrpprotected void completeUsbIrp()
public void setUsbIrp(UsbIrp irp)
irp - The UsbIrp.public boolean hasUsbIrp()
public UsbIrp getUsbIrp()
public void setUsbIrpImpListener(UsbIrpImp.UsbIrpImpListener listener)
If there is already a Listener, this will clobber it!
public UsbIrpImp.UsbIrpImpListener getUsbIrpImpListener()
public static void checkUsbIrp(UsbIrp irp)
throws IllegalArgumentException,
UsbException
This may be used to check the validity of an UsbIrp. This will throw an IllegalArgumentException if the UsbIrp does not behave as specified in the UsbIrp interface documentation. This will throw an UsbException if the UsbIrp is in a state not ready for submission, such as being complete or having a UsbException.
IllegalArgumentException - If the UsbIrp is not valid.
UsbException - If the UsbIrp is not ready for submission.protected void checkShortPacketException()
If there is a short packet condition but no exception is set, this will create and set one.
public void setCreateShortPacketException(boolean setting)
If this is set to true, the checkShortPacketException method
will create and set a UsbShortPacketException during {#link #complete() complete}, if appropriate.
setting - The setting.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||