Package org.hid4java

Class HidServicesSpecification


  • public class HidServicesSpecification
    extends java.lang.Object

    Specification to provide the following to API consumers:

    • Flexible configuration of HID services parameters
    Since:
    0.5.0  
    • Field Detail

      • autoShutdown

        private boolean autoShutdown
      • scanInterval

        private int scanInterval
      • pauseInterval

        private int pauseInterval
    • Constructor Detail

      • HidServicesSpecification

        public HidServicesSpecification()
    • Method Detail

      • getScanMode

        public ScanMode getScanMode()
      • setScanMode

        public void setScanMode​(ScanMode scanMode)
        Parameters:
        scanMode - The scan mode to use to facilitate attach/detach events
      • getScanInterval

        public int getScanInterval()
      • setScanInterval

        public void setScanInterval​(int scanInterval)
        Parameters:
        scanInterval - The interval in milliseconds between device enumeration scans
      • getPauseInterval

        public int getPauseInterval()
      • setPauseInterval

        public void setPauseInterval​(int pauseInterval)
        Parameters:
        pauseInterval - The interval in milliseconds where device enumeration is paused (if scan mode supports pausing)
      • isAutoShutdown

        public boolean isAutoShutdown()
      • setAutoShutdown

        public void setAutoShutdown​(boolean autoShutdown)
        Parameters:
        autoShutdown - True if a shutdown hook should be set to close the API automatically (recommended)