Interface CommandListener
-
- All Known Implementing Classes:
DefaultCommandListener
public interface CommandListenerListens for execution of Integrity commands.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcommandCompleted(Element element, com.mks.api.Command command, com.mks.api.response.Response response)Notifies a command execution is completed.voidcommandFailed(Element element, com.mks.api.Command command, CoreException error)Notifies a command has failed to executed properly.voidcommandStarted(Element element, com.mks.api.Command command)Notifies a command execution is about to start.
-
-
-
Method Detail
-
commandStarted
void commandStarted(Element element, com.mks.api.Command command) throws CoreException
Notifies a command execution is about to start.- Parameters:
element- the element on which a command is executed.command- the command to execute.- Throws:
CoreException- if the execution should be aborted.
-
commandCompleted
void commandCompleted(Element element, com.mks.api.Command command, com.mks.api.response.Response response) throws CoreException
Notifies a command execution is completed.- Parameters:
element- the element on which a command is executed.command- the executed command.response- the response obtained for the command execution.- Throws:
CoreException- if the command was successfully executed but this listener considers the execution should be a failure.
-
commandFailed
void commandFailed(Element element, com.mks.api.Command command, CoreException error) throws CoreException
Notifies a command has failed to executed properly.- Parameters:
element- the element on which a command is executed.command- the executed command.error- the error that occurred during execution.- Throws:
CoreException- if listener considers a different error should be reported (e.g. to get a more contextual error message).
-
-