Top Description Fields Constructors Methods
javax.usb

public final Class UsbHostManager

extends Object
Class Inheritance
Imports
java.io.*, java.util.*, java.security.*

Entry point for javax.usb.
Authors
Dan Streetman, E. Michael Maximilien

Field Summary

Modifier and TypeField and Description
public static final String
public static final String
private static Properties
private static final String
private static final String
private static final String
private static boolean
private static Object
private static Object
private static UsbServices

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static UsbServices

Returns:

The UsbServices implementation instance.
createUsbServices
()

Create the UsbServices implementation instance.

public static Properties

Returns:

An copy of the Properties.
getProperties
()

Get the Properties loaded from the properties file.

public static UsbServices

Returns:

The UsbServices implementation instance.
getUsbServices
()

Get the UsbServices implementation.

private static void
setupProperties()

Set up the Properties using the properties file.

private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

JAVAX_USB_PROPERTIES_FILEback to summary
public static final String JAVAX_USB_PROPERTIES_FILE
JAVAX_USB_USBSERVICES_PROPERTYback to summary
public static final String JAVAX_USB_USBSERVICES_PROPERTY
propertiesback to summary
private static Properties properties
PROPERTIES_FILE_IOEXCEPTION_CLOSINGback to summary
private static final String PROPERTIES_FILE_IOEXCEPTION_CLOSING
PROPERTIES_FILE_IOEXCEPTION_READINGback to summary
private static final String PROPERTIES_FILE_IOEXCEPTION_READING
PROPERTIES_FILE_NOT_FOUNDback to summary
private static final String PROPERTIES_FILE_NOT_FOUND
propertiesLoadedback to summary
private static boolean propertiesLoaded
propertiesLockback to summary
private static Object propertiesLock
servicesLockback to summary
private static Object servicesLock
usbServicesback to summary
private static UsbServices usbServices

Constructor Detail

UsbHostManagerback to summary
private UsbHostManager()

Method Detail

createUsbServicesback to summary
private static UsbServices createUsbServices() throws UsbException, SecurityException

Create the UsbServices implementation instance.

This creates the UsbServices implementation instance based on the class named in the properties file.

Returns:UsbServices

The UsbServices implementation instance.

Exceptions
UsbException:
If the UsbServices class could not be instantiated.
SecurityException:
If the caller does not have security access.
getPropertiesback to summary
public static Properties getProperties() throws UsbException, SecurityException

Get the Properties loaded from the properties file.

If the properties have not yet been loaded, this loads them.

Returns:Properties

An copy of the Properties.

Exceptions
UsbException:
If an error occurs while loading the properties.
SecurityException:
If the caller does not have security access.
getUsbServicesback to summary
public static UsbServices getUsbServices() throws UsbException, SecurityException

Get the UsbServices implementation.

Returns:UsbServices

The UsbServices implementation instance.

Exceptions
UsbException:
If there is an error creating the UsbSerivces implementation.
SecurityException:
If the caller does not have security access.
setupPropertiesback to summary
private static void setupProperties() throws UsbException, SecurityException

Set up the Properties using the properties file.

This populates the Properties using the key-values listed in the properties file.

Exceptions
UsbException:
If an error occurs.
SecurityException:
If the caller does not have security access.
USBSERVICES_CLASSCASTEXCEPTIONback to summary
private static final String USBSERVICES_CLASSCASTEXCEPTION(String c)
USBSERVICES_CLASSNOTFOUNDEXCEPTIONback to summary
private static final String USBSERVICES_CLASSNOTFOUNDEXCEPTION(String c)
USBSERVICES_EXCEPTIONININITIALIZERERRORback to summary
private static final String USBSERVICES_EXCEPTIONININITIALIZERERROR(String c)
USBSERVICES_ILLEGALACCESSEXCEPTIONback to summary
private static final String USBSERVICES_ILLEGALACCESSEXCEPTION(String c)
USBSERVICES_INSTANTIATIONEXCEPTIONback to summary
private static final String USBSERVICES_INSTANTIATIONEXCEPTION(String c)
USBSERVICES_PROPERTY_NOT_DEFINEDback to summary
private static final String USBSERVICES_PROPERTY_NOT_DEFINED()