Class DefaultCommandListener
- java.lang.Object
-
- com.sodius.mdw.metamodel.integrity.io.command.DefaultCommandListener
-
- All Implemented Interfaces:
CommandListener
public class DefaultCommandListener extends Object implements CommandListener
A default listener implementation that just logs command failures.
-
-
Constructor Summary
Constructors Constructor Description DefaultCommandListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommandCompleted(Element element, com.mks.api.Command command, com.mks.api.response.Response response)Notification ignored by implementation.voidcommandFailed(Element element, com.mks.api.Command command, CoreException error)Logs the command failure and re-throw the exception.voidcommandStarted(Element element, com.mks.api.Command command)Notification ignored by implementation.
-
-
-
Method Detail
-
commandStarted
public void commandStarted(Element element, com.mks.api.Command command) throws CoreException
Notification ignored by implementation.- Specified by:
commandStartedin interfaceCommandListener- Parameters:
element- the element on which a command is executed.command- the command to execute.- Throws:
CoreException- never thrown by default implementation.
-
commandCompleted
public void commandCompleted(Element element, com.mks.api.Command command, com.mks.api.response.Response response) throws CoreException
Notification ignored by implementation.- Specified by:
commandCompletedin interfaceCommandListener- Parameters:
element- the element on which a command is executed.command- the executed command.response- the response obtained for the command execution.- Throws:
CoreException- never thrown by default implementation.
-
commandFailed
public void commandFailed(Element element, com.mks.api.Command command, CoreException error) throws CoreException
Logs the command failure and re-throw the exception. The logger used is the one assigned when reading the Integrity model.- Specified by:
commandFailedin interfaceCommandListener- Parameters:
element- the element on which a command is executed.command- the executed command.error- the error that occurred during execution.- Throws:
CoreException- always re-throws the exception received as argument.
-
-