org.keridwen.core.messaging.internal
Class CommandFactory
java.lang.Object
org.keridwen.core.messaging.internal.CommandFactory
public final class CommandFactory
- extends Object
Method Summary |
static
|
compose(Command<IntermediateMessageType,MessageType> command1,
Command<ReturnType,IntermediateMessageType> command2)
Return the composition of two Command s. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
compose
public static <ReturnType extends Serializable,IntermediateMessageType extends Serializable,MessageType extends Serializable> Command<ReturnType,MessageType> compose(Command<IntermediateMessageType,MessageType> command1,
Command<ReturnType,IntermediateMessageType> command2)
- Return the composition of two
Command
s. For command2: IntermediateMessageType->ReturnType and
command1: MessageType->IntermediateMessageType, composition is defined as the function h such that h(a) ==
command2(command1(a)) for each a.
- Type Parameters:
ReturnType
- the return type of the composed function.IntermediateMessageType
- the return type of the g function, that is the message type of the f functionMessageType
- the message type of the composed function, that is the message type of the g function- Parameters:
command1
- the first command to composecommand2
- the second command to compose
- Returns:
- the composed command
Copyright © 2010-2013 Artenum. All Rights Reserved.