org.axonframework.quickstart
Class RunDistributedCommandBus

java.lang.Object
  extended by org.axonframework.quickstart.RunDistributedCommandBus

public class RunDistributedCommandBus
extends Object

This runner demonstrates the basic capabilities of the distributed command bus. It uses the default routing strategy based on annotations. JGroups is used to connect the multiple jvm instances. Two very basic logging command handlers are used to print the received commands. Each line starts with a number counting the amount of commands handled by the instance of the command handler.

When starting the runner two parameters are asked. The load factor and the amount of times to send the commands.

Author:
Jettro Coenradie

Nested Class Summary
static class RunDistributedCommandBus.ToDoLoggingCommandHandler
           
 
Constructor Summary
RunDistributedCommandBus()
           
 
Method Summary
static Integer determineLoadFactor()
           
static Integer determineNumberOfCommandLoops()
           
static void main(String[] args)
           
static Integer readNumberFromCommandlinePlusDefault(String message, int defaultValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunDistributedCommandBus

public RunDistributedCommandBus()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

determineNumberOfCommandLoops

public static Integer determineNumberOfCommandLoops()

determineLoadFactor

public static Integer determineLoadFactor()

readNumberFromCommandlinePlusDefault

public static Integer readNumberFromCommandlinePlusDefault(String message,
                                                           int defaultValue)


Copyright © 2010-2016. All Rights Reserved.