Interface CommandListener
- All Known Subinterfaces:
CommandResultListener
Defines the interface that you should implement to receive information on the result of a command.
For more about commands, see CommandSubscription
.
A trivial implementation would be as follows :
import java.util.HashMap;
import java.util.Map;
import com.caplin.streamlink.CommandErrorEvent;
import com.caplin.streamlink.CommandListener;
import com.caplin.streamlink.StreamLink;
public class CommandListenerSnippet
{
public CommandListenerSnippet(StreamLink streamLink)
{
Map
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onCommandError
(String subject, CommandErrorEvent commandErrorEvent) Callback invoked when a command failed or is an unknown state.void
onCommandOk
(String subject) Callback invoked when a command was successful.
-
Method Details
-
onCommandOk
Callback invoked when a command was successful.
- Parameters:
subject
- The subject of the command.
-
onCommandError
Callback invoked when a command failed or is an unknown state.
- Parameters:
subject
- The subject of the command.commandErrorEvent
- Information about the command error.
-