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

java.lang.Object
  extended by org.keridwen.core.messaging.internal.ParallelScheme<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 Implemented Interfaces:
Scheme<U,V>

public class ParallelScheme<U extends Serializable,V extends Serializable>
extends Object
implements Scheme<U,V>

A ParallelScheme executes a list of Commands in parallel.


Constructor Summary
ParallelScheme()
          Default constructor.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParallelScheme

public ParallelScheme()
Default constructor.

Method Detail

execute

public final U execute(V message)
                                     throws CommandException
Description copied from interface: Scheme
Executes the given list of Commands with the given Event.

Specified by:
execute in interface Scheme<U extends Serializable,V extends Serializable>
Parameters:
message - the message to handle
Returns:
the value returned by the last command in the list
Throws:
CommandException

getCommandsList

public final List<Command<U,V>> getCommandsList()
Description copied from interface: Scheme
Gets the list of Commands managed by the scheme.

Specified by:
getCommandsList in interface Scheme<U extends Serializable,V extends Serializable>
Returns:
the commands list


Copyright © 2010-2013 Artenum. All Rights Reserved.