com.googlecode.jpattern.core.command
Class ACommand
java.lang.Object
com.googlecode.jpattern.core.command.ICommand
com.googlecode.jpattern.core.command.ACommand
- All Implemented Interfaces:
- Serializable, Runnable
- Direct Known Subclasses:
- FileCopyCommand, FileCreateCommand, FileDeleteCommand, FileRenameCommand, SendMailCommand, TransactionBeginCommand, TransactionCommitCommand, TransactionRollbackCommand, XmlReaderCommand, XmlWriterCommand
public abstract class ACommand
- extends ICommand
- implements Runnable
- Author:
- Francesco Cina'
27/feb/2011
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ACommand
public ACommand(ICommand previousCommand)
exec
public final ICommandResult exec()
- Description copied from class:
ICommand
- This method launch the execution of the command (or chain of commands) using the default
default Executor.
This command is the same of:
exec(new ConditionalCommandExecutor());
- Specified by:
exec in class ICommand
- Returns:
- the result of the execution
exec
public final ICommandResult exec(ICommandExecutor aCommandExecutor)
- Description copied from class:
ICommand
- This method launch the execution of the command (or chain of commands).
Every command in the chain will be managed by an ICommandExecutor object
- Specified by:
exec in class ICommand
- Parameters:
aCommandExecutor - the pool in which the command will runs
- Returns:
- the result of the execution
visit
public final void visit(IProvider provider)
- Specified by:
visit in class ICommand
run
public final void run()
- Specified by:
run in interface Runnable
getLogger
protected final ILogger getLogger()
result
protected abstract void result(ICommandResult result)
internalRollBack
protected abstract void internalRollBack(ICommandResult result)
getPreviousCommand
protected ICommand getPreviousCommand()
getProvider
protected IProvider getProvider()
Copyright © 2011. All Rights Reserved.