org.keridwen.core.messaging.internal
Class AbstractCommandScheme<U extends Serializable,V extends Serializable>

java.lang.Object
  extended by org.keridwen.core.messaging.internal.AbstractCommandScheme<U,V>
Type Parameters:
U - type of the value returned by the Command.
V - type of the message the Command can handle.
All Implemented Interfaces:
Controllable, Progressable, Command<U,V>

public abstract class AbstractCommandScheme<U extends Serializable,V extends Serializable>
extends Object
implements Command<U,V>

A AbstractCommandScheme contains a list of Commands to be executed and the Scheme describing how to do it.


Constructor Summary
AbstractCommandScheme()
           
 
Method Summary
 U execute(V message)
          Executes the Command's logic with a given message.
abstract  Scheme<U,V> getScheme()
          Gets the Scheme of the CommandScheme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.keridwen.core.messaging.Command
checkPreConditions, getApplicationModel, getBundleModel, getDescription, getLabel, getLogLevel, isUndoable, setModels, undo, validatePostConditions
 
Methods inherited from interface org.keridwen.core.data.model.progress.Controllable
addControllableListener, clearControllableListener, getState, interrupt, isInterrupted, isInterruptible, isPausable, pause, removeControllableListener, resume
 
Methods inherited from interface org.keridwen.core.data.model.progress.Progressable
addProgressableListener, clearProgressableListener, getProgress, getState, isDetermined, removeProgressableListener
 

Constructor Detail

AbstractCommandScheme

public AbstractCommandScheme()
Method Detail

execute

public final U execute(V message)
                                     throws CommandException
Description copied from interface: Command
Executes the Command's logic with a given message.

Specified by:
execute in interface Command<U extends Serializable,V extends Serializable>
Parameters:
message - the message to use for the execution.
Returns:
the result of the command execution
Throws:
CommandException - exceptions raised during the execution of the command.

getScheme

public abstract Scheme<U,V> getScheme()
Gets the Scheme of the CommandScheme.

Returns:
the Scheme.


Copyright © 2010-2013 Artenum. All Rights Reserved.