Package com.flir.thermalsdk.live.remote
Class Command<Ret>
java.lang.Object
com.flir.thermalsdk.live.remote.Command<Ret>
Represents a command on the remote camera.
Executing a command will send requests to the camera.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
execute
(OnReceived<Ret> onReceived, OnRemoteError onError) Executes the command asynchronously.abstract Ret
Executes the command synchronously (blocking).abstract boolean
Check if this command is available.
-
Constructor Details
-
Command
public Command()
-
-
Method Details
-
isAvailable
Check if this command is available. Some commands are only supported by some types of cameras. Use this method to check if this command is supported before reading/writing.Note: this method may throw a
RuntimeException
if communication with the remote camera fails or some other problem occurs. -
execute
Executes the command asynchronously.- Parameters:
onReceived
- Callback that is invoked if the command was successfully executed. It may contain a data returned from executed command.onError
- Callback that is invoked if any error occurred during update.
-
executeSync
Executes the command synchronously (blocking). It may contain a data returned from executed command.Note: this method may throw a
RuntimeException
if communication with the remote camera fails or some other problem occurs.- Returns:
- It may contain a data returned from executed command, or a
Void
meaning the command is not returning any value.
-