Package org.hid4java
Class HidServicesSpecification
java.lang.Object
org.hid4java.HidServicesSpecification
Specification to provide the following to API consumers:
- Flexible configuration of HID services parameters
- Since:
- 0.5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private int
private int
private ScanMode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
int
boolean
boolean
void
setAutoShutdown
(boolean autoShutdown) void
setAutoStart
(boolean autoStart) void
setPauseInterval
(int pauseInterval) void
setScanInterval
(int scanInterval) void
setScanMode
(ScanMode scanMode)
-
Field Details
-
scanMode
-
autoShutdown
private boolean autoShutdown -
scanInterval
private int scanInterval -
pauseInterval
private int pauseInterval -
autoStart
private boolean autoStart
-
-
Constructor Details
-
HidServicesSpecification
public HidServicesSpecification()
-
-
Method Details
-
getScanMode
-
setScanMode
- 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)
-
isAutoStart
public boolean isAutoStart() -
setAutoStart
public void setAutoStart(boolean autoStart) - Parameters:
autoStart
- True if the HidServices should start before any listeners are registered (default is backwards compatible to 0.6.0 and below)
-