org.keridwen.core.messaging.internal
Class AbstractCommandScheme<U extends Serializable,V extends Serializable>
java.lang.Object
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 Command
s to be executed and the Scheme
describing how to do it.
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 |
AbstractCommandScheme
public AbstractCommandScheme()
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.