Class DeviceSession

java.lang.Object
io.scanbot.sdk.DeviceSession
All Implemented Interfaces:
AutoCloseable

public class DeviceSession extends Object implements AutoCloseable
Convenience class to manage device usage for a floating license.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Default timeout for device deregistration in milliseconds which is used if no timeout is specified.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor to create a DeviceSession with a default timeout 15000 milliseconds (15 seconds).
    DeviceSession(int closeTimeoutMs)
    Constructor to create a DeviceSession with a given close timeout.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Effectively calls the ScanbotSDK.deregisterDevice() method to notify the server that the device is no longer using the license and then waits for the completion of the deregistration process.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_CLOSE_TIMEOUT_MS

      public static final int DEFAULT_CLOSE_TIMEOUT_MS
      Default timeout for device deregistration in milliseconds which is used if no timeout is specified.
      See Also:
  • Constructor Details

    • DeviceSession

      public DeviceSession(int closeTimeoutMs)
      Constructor to create a DeviceSession with a given close timeout.
      Parameters:
      closeTimeoutMs - The timeout in milliseconds for device deregistration.
    • DeviceSession

      public DeviceSession()
      Constructor to create a DeviceSession with a default timeout 15000 milliseconds (15 seconds).
  • Method Details