|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.commandhandling.distributed.AbstractRoutingStrategy
public abstract class AbstractRoutingStrategy
Abstract implementation of the RoutingStrategy interface that uses a policy to prescribe what happens when a routing cannot be resolved.
Constructor Summary | |
---|---|
AbstractRoutingStrategy(UnresolvedRoutingKeyPolicy unresolvedRoutingKeyPolicy)
Initializes the strategy using given unresolvedRoutingKeyPolicy prescribing what happens when a
routing key cannot be resolved. |
Method Summary | |
---|---|
protected abstract String |
doResolveRoutingKey(CommandMessage<?> command)
Resolve the Routing Key for the given command . |
String |
getRoutingKey(CommandMessage<?> command)
Generates a routing key for the given command . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractRoutingStrategy(UnresolvedRoutingKeyPolicy unresolvedRoutingKeyPolicy)
unresolvedRoutingKeyPolicy
prescribing what happens when a
routing key cannot be resolved.
unresolvedRoutingKeyPolicy
- The policy for unresolved routing keys.Method Detail |
---|
public String getRoutingKey(CommandMessage<?> command)
RoutingStrategy
command
. Commands that should be handled by the same segment,
should result in the same routing key.
getRoutingKey
in interface RoutingStrategy
command
- the command to create a routing key for
protected abstract String doResolveRoutingKey(CommandMessage<?> command)
command
.
command
- The command to resolve the routing key for
null
if unresolved.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |