Top Description Methods
javax.usb

public Interface UsbHub

extends UsbDevice
Imports
java.util.*

Interface for a USB hub.
Authors
Dan Streetman, E. Michael Maximilien

Method Summary

Modifier and TypeMethod and Description
public List<E>

Returns:

All devices currently attached to this hub.
getAttachedUsbDevices
()

Get all attached UsbDevices.

public byte

Returns:

The number of (downstream) ports for this hub.
getNumberOfPorts
()

Get the number of (downstream) ports this hub has.

public UsbPort

Returns:

The specified port, or null.
getUsbPort
(byte
The number (1-based) of the port to get.
number
)

Get a specific UsbPort by port number.

public List<E>

Returns:

All ports this hub has.
getUsbPorts
()

Get all the ports this hub has.

public boolean

Returns:

If this is the virtual root hub.
isRootUsbHub
()

If this is the virtual root hub.

Inherited from javax.usb.UsbDevice:
addUsbDeviceListenerasyncSubmitasyncSubmitcontainsUsbConfigurationcreateUsbControlIrpgetActiveUsbConfigurationgetActiveUsbConfigurationNumbergetManufacturerStringgetParentUsbPortgetProductStringgetSerialNumberStringgetSpeedgetStringgetUsbConfigurationgetUsbConfigurationsgetUsbDeviceDescriptorgetUsbStringDescriptorisConfiguredisUsbHubremoveUsbDeviceListenersyncSubmitsyncSubmit

Method Detail

getAttachedUsbDevicesback to summary
public List<E> getAttachedUsbDevices()

Get all attached UsbDevices.

The List will be unmodifiable.

Returns:List<E>

All devices currently attached to this hub.

getNumberOfPortsback to summary
public byte getNumberOfPorts()

Get the number of (downstream) ports this hub has.

This is only the number of ports on the hub, not all ports are necessarily enabled, available, usable, or in some cases physically present. This only represents the number of downstream ports the hub claims to have. Note that all hubs have exactly one upstream port, which allows it to connect to the system (or another upstream hub). There is also a internal port which is generally only used by the hub itself. See the USB 1.1 specification sec 11.4 for details on the internal port, sec 11.5 for details on the downstream ports, and sec 11.6 for details on the upstream port.

Returns:byte

The number of (downstream) ports for this hub.

getUsbPortback to summary
public UsbPort getUsbPort(byte number)

Get a specific UsbPort by port number.

This gets the UsbPort with the specified number. The port numbering is 1-based (not 0-based), and the max port number is 255. See the USB 1.1 specification table 11.8 offset 7.

If the specified port does not exist, this returns null.

Parameters
number:byte

The number (1-based) of the port to get.

Returns:UsbPort

The specified port, or null.

getUsbPortsback to summary
public List<E> getUsbPorts()

Get all the ports this hub has.

The port numbering is 1-based.

The List will be unmodifiable.

Returns:List<E>

All ports this hub has.

See Also
getUsbPort(byte number)
isRootUsbHubback to summary
public boolean isRootUsbHub()

If this is the virtual root hub.

Returns:boolean

If this is the virtual root hub.