org.keridwen.core.messaging
Interface Scheme<U,V>

Type Parameters:
U - type of the value returned by the last Command of the list.
V - type of the message the first Command of the list can handle.
All Known Implementing Classes:
ParallelScheme, SequenceScheme

public interface Scheme<U,V>

A Scheme describes how a list of Commands has to be executed.


Method Summary
 U execute(V message)
          Executes the given list of Commands with the given Event.
 List<Command<U,V>> getCommandsList()
          Gets the list of Commands managed by the scheme.
 

Method Detail

execute

U execute(V message)
          throws CommandException
Executes the given list of Commands with the given Event.

Parameters:
message - the message to handle
Returns:
the value returned by the last command in the list
Throws:
any - exception raised during command execution
CommandException

getCommandsList

List<Command<U,V>> getCommandsList()
Gets the list of Commands managed by the scheme.

Returns:
the commands list


Copyright © 2010-2013 Artenum. All Rights Reserved.