|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.jusb.UsbPortImp
public class UsbPortImp
UsbPort implementation.
| Constructor Summary | |
|---|---|
UsbPortImp(UsbHubImp hub,
byte number)
Constructor. |
|
| Method Summary | |
|---|---|
void |
attachUsbDeviceImp(UsbDeviceImp device)
Attaches the UsbDeviceImp to this port. |
void |
detachUsbDeviceImp(UsbDeviceImp device)
Detaches the attached UsbDeviceImp from this port. |
byte |
getPortNumber()
Return the number of this port. |
UsbDevice |
getUsbDevice()
Get the UsbDevice attached to this UsbPort. |
UsbDeviceImp |
getUsbDeviceImp()
|
UsbHub |
getUsbHub()
Get the parent UsbHub. |
UsbHubImp |
getUsbHubImp()
|
boolean |
isUsbDeviceAttached()
If a device is attached to this port. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UsbPortImp(UsbHubImp hub,
byte number)
hub - The parent UsbHubImp.number - The (1-based) port number.| Method Detail |
|---|
public byte getPortNumber()
The port number is 1-based.
getPortNumber in interface UsbPortpublic UsbHub getUsbHub()
UsbPort
getUsbHub in interface UsbPortpublic UsbHubImp getUsbHubImp()
public boolean isUsbDeviceAttached()
UsbPort
isUsbDeviceAttached in interface UsbPortpublic UsbDevice getUsbDevice()
UsbPortIf no UsbDevice is attached, this returns null.
getUsbDevice in interface UsbPortpublic UsbDeviceImp getUsbDeviceImp()
public void attachUsbDeviceImp(UsbDeviceImp device)
throws java.lang.IllegalArgumentException
device - The UsbDeviceImp to attach.
java.lang.IllegalArgumentException - If there is already a device attached.
public void detachUsbDeviceImp(UsbDeviceImp device)
throws java.lang.IllegalArgumentException
device - the UsbDeviceImp to detach.
java.lang.IllegalArgumentException - If the UsbDeviceImp is not already attached.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||