Interface CameraScanner
- All Superinterfaces:
AutoCloseable
Interface allowing to perform an active search (discovery) for cameras.
-
Method Summary
Modifier and TypeMethodDescriptionvoidpoll()Processes the internal queue, and may trigger callbacks.voidscan(@NotNull DiscoveryEventListener listener) Starts an active devices discovery.voidstop()Stops an active scan.Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
scan
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 threadscan(DiscoveryEventListener)was invoked.
Note: Should only be called when the CameraScanner is active, e.g. afterscan(DiscoveryEventListener)has been called, but beforestop()is called.
Note: this method is not allowed to throw an exception, all exceptions must be caught in the method's implementation.
-