|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.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
|
Constructor Summary | |
---|---|
UsbIrpImp()
Constructor. |
|
UsbIrpImp(UsbIrp irp)
Constructor. |
Method Summary | |
---|---|
static void |
checkUsbIrp(UsbIrp irp)
Check the specified UsbIrp. |
void |
complete()
Complete this submission. |
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 |
---|
equals, 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 |
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 UsbIrp
complete
in class DefaultUsbIrp
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 java.lang.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.
java.lang.IllegalArgumentException
- If the UsbIrp is not valid.
UsbException
- If the UsbIrp is not ready for submission.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 |