Class DeviceManager


  • public final class DeviceManager
    extends java.lang.Object
    This class manages ScripTouch devices.
    • Method Detail

      • getInitialErrorMessage

        public static java.lang.String getInitialErrorMessage()
        This message will return a String containing an error message if initialization failed for some reason, such as if one of the required ProScript libraries does not exist.
        Returns:
        initialization error message
      • getAttachedDevices

        public static Device[] getAttachedDevices()
                                           throws java.io.IOException
        This method will return any and all attached ScripTouch devices.
        Returns:
        List of ScripTouch devices attached to the computer.
        Throws:
        java.io.IOException - Thrown in the event of a problem.
      • registerDeviceListener

        public static void registerDeviceListener​(DeviceNotificationListener listener)
        This method registers a new device listener for added and removed devices.
        Parameters:
        listener - The listener to add.
      • registerDeviceListener

        public static void registerDeviceListener​(DeviceNotificationListener listener,
                                                  boolean sendCached)
        This method registers a new device listener for added and removed devices. Do not attempt to register or unregister device listeners within the listener callback.
        Parameters:
        listener - The listener to add.
        sendCached - Whether or not to send the currently connected devices to the listener upon registration.
      • unregisterDeviceListener

        public static void unregisterDeviceListener​(DeviceNotificationListener listener)
        This method unregisters a device listener. Do not attempt to register or unregister a device listener inside of a listener callback.
        Parameters:
        listener - Listener to remove.
      • destroy

        public static void destroy()
        Destroy the ProScript library, call this prior to closing your application, do not call anything else in the library after calling this.
      • getWrapperVersion

        public static java.lang.String getWrapperVersion()
        Gets the version of the Java wrapper.
        Returns:
        Version number of the Java wrapper.
      • getWrapperVersionMajor

        public static int getWrapperVersionMajor()
        Gets the major component of the Java wrapper version.
        Returns:
        Major component of the Java wrapper version.
      • getWrapperVersionMinor

        public static int getWrapperVersionMinor()
        Gets the minor component of the Java wrapper version.
        Returns:
        Minor component of the Java wrapper version.
      • getWrapperVersionRelease

        public static int getWrapperVersionRelease()
        Gets the release component of the Java wrapper version.
        Returns:
        Release component of the Java wrapper version.
      • getWrapperBuildDate

        public static java.util.Date getWrapperBuildDate()
        Gets the date the Java wrapper was built.
        Returns:
        Date the Java wrapper was built.
      • getLibraryVersion

        public static java.lang.String getLibraryVersion()
        Gets the version of the ProScript library.
        Returns:
        ProScript library version.
      • getLibraryVersionMajor

        public static int getLibraryVersionMajor()
        Gets the major component of the ProScript library version.
        Returns:
        Major component of the ProScript library version.
      • getLibraryVersionMinor

        public static int getLibraryVersionMinor()
        Gets the minor component of the ProScript library version.
        Returns:
        Minor component of the ProScript library version.
      • getLibraryVersionRelease

        public static int getLibraryVersionRelease()
        Gets the release component of the ProScript library version.
        Returns:
        Release component of the ProScript library version.
      • getLibraryBuildDate

        public static java.util.Date getLibraryBuildDate()
        Gets the date the library was built.
        Returns:
        The date the ProScript library was built.