Interface CameraScanner

All Superinterfaces:
AutoCloseable

public interface CameraScanner extends AutoCloseable
Interface allowing to perform an active search (discovery) for cameras.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Processes the internal queue, and may trigger callbacks.
    void
    scan(@NotNull DiscoveryEventListener listener)
    Starts an active devices discovery.
    void
    Stops an active scan.

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Method Details

    • scan

      void scan(@NotNull @NotNull DiscoveryEventListener listener)
      Starts an active devices discovery.
      Note: this method is blocking and should start on a background thread.
      Note: this method uses callback to inform about different discovery events or errors.
      Note: this method is not allowed to throw an exception, all exceptions must be caught in the method's implementation.
      Parameters:
      listener - a listener for different discovery events or errors
    • stop

      void stop()
      Stops an active scan. Does nothing if the scan is not active.
      Note: this method is blocking and should start on a background thread.
      Note: this function should never throw an exception.
      Note: this method is not allowed to throw an exception, all exceptions must be caught in the method's implementation.
    • poll

      void poll()
      Processes the internal queue, and may trigger callbacks.
      Should be invoked from the same thread scan(DiscoveryEventListener) was invoked.
      Note: Should only be called when the CameraScanner is active, e.g. after scan(DiscoveryEventListener) has been called, but before stop() is called.
      Note: this method is not allowed to throw an exception, all exceptions must be caught in the method's implementation.