Download Axon trader Free Java Code
Description
A sample to use the axon framework for a trading application.
Source Files
The download file Axon-trader-master.zip has the following entries.
.gitignore//from w w w.j a va 2 s . c om
README
companies/pom.xml
companies/src/main/java/org/axonframework/samples/trader/company/command/Company.java
companies/src/main/java/org/axonframework/samples/trader/company/command/CompanyCommandHandler.java
companies/src/main/java/org/axonframework/samples/trader/company/command/CompanyOrderBookListener.java
companies/src/main/resources/META-INF/spring/companies-context.xml
companies/src/test/java/org/axonframework/samples/trader/company/command/CompanyCommandHandlerTest.java
companies/src/test/resources/log4j.properties
core-api/pom.xml
core-api/src/main/java/org/axonframework/samples/trader/api/company/AddOrderBookToCompanyCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/company/CompanyCreatedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/company/CompanyId.java
core-api/src/main/java/org/axonframework/samples/trader/api/company/CreateCompanyCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/company/OrderBookAddedToCompanyEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/trades/AbstractOrderCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/trades/AbstractOrderPlacedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/trades/BuyOrderPlacedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/trades/CreateBuyOrderCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/trades/CreateOrderBookCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/trades/CreateSellOrderCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/trades/OrderBookCreatedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/trades/OrderBookId.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/trades/OrderId.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/trades/PortfolioId.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/trades/SellOrderPlacedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/trades/TradeExecutedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/trades/TransactionId.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/AbstractStartTransactionCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/AbstractTransactionCancelledEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/AbstractTransactionConfirmedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/AbstractTransactionExecutedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/AbstractTransactionPartiallyExecutedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/AbstractTransactionStartedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/BuyTransactionCancelledEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/BuyTransactionConfirmedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/BuyTransactionExecutedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/BuyTransactionPartiallyExecutedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/BuyTransactionStartedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/CancelTransactionCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/ConfirmTransactionCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/ExecutedTransactionCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/SellTransactionCancelledEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/SellTransactionConfirmedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/SellTransactionExecutedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/SellTransactionPartiallyExecutedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/SellTransactionStartedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/StartBuyTransactionCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/StartSellTransactionCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/orders/transaction/TransactionType.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/CreatePortfolioCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/PortfolioCreatedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/cash/CancelCashReservationCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/cash/CashDepositedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/cash/CashReservationCancelledEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/cash/CashReservationConfirmedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/cash/CashReservationRejectedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/cash/CashReservedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/cash/CashWithdrawnEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/cash/ConfirmCashReservationCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/cash/DepositCashCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/cash/ReserveCashCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/cash/WithdrawCashCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/stock/AddItemsToPortfolioCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/stock/CancelItemReservationForPortfolioCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/stock/ConfirmItemReservationForPortfolioCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/stock/ItemReservationCancelledForPortfolioEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/stock/ItemReservationConfirmedForPortfolioEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/stock/ItemToReserveNotAvailableInPortfolioEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/stock/ItemsAddedToPortfolioEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/stock/ItemsReservedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/stock/NotEnoughItemsAvailableToReserveInPortfolio.java
core-api/src/main/java/org/axonframework/samples/trader/api/portfolio/stock/ReserveItemsCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/users/AuthenticateUserCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/users/CreateUserCommand.java
core-api/src/main/java/org/axonframework/samples/trader/api/users/UserAccount.java
core-api/src/main/java/org/axonframework/samples/trader/api/users/UserAuthenticatedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/users/UserCreatedEvent.java
core-api/src/main/java/org/axonframework/samples/trader/api/users/UserId.java
external-listeners/pom.xml
external-listeners/src/main/java/org/axonframework/samples/trader/listener/OrderbookExternalListener.java
external-listeners/src/main/resources/META-INF/spring/external-context.xml
external-listeners/src/main/resources/external-config.properties
infrastructure/pom.xml
infrastructure/src/main/java/org/axonframework/samples/trader/infra/mongo/CFMongoTemplate.java
infrastructure/src/main/java/org/axonframework/samples/trader/infra/mongo/CFSagaMongoTemplate.java
infrastructure/src/main/java/org/axonframework/samples/trader/infra/util/ProfilingAspect.java
infrastructure/src/main/resources/META-INF/spring/configuration-context.xml
infrastructure/src/main/resources/META-INF/spring/cqrs-infrastructure-context.xml
infrastructure/src/main/resources/META-INF/spring/persistence-infrastructure-context.xml
infrastructure/src/main/resources/trader.properties
orders/pom.xml
orders/src/main/java/org/axonframework/samples/trader/orders/command/BuyTradeManagerSaga.java
orders/src/main/java/org/axonframework/samples/trader/orders/command/Portfolio.java
orders/src/main/java/org/axonframework/samples/trader/orders/command/PortfolioCommandHandler.java
orders/src/main/java/org/axonframework/samples/trader/orders/command/PortfolioManagementUserListener.java
orders/src/main/java/org/axonframework/samples/trader/orders/command/SellTradeManagerSaga.java
orders/src/main/java/org/axonframework/samples/trader/orders/command/TradeManagerSaga.java
orders/src/main/java/org/axonframework/samples/trader/orders/command/Transaction.java
orders/src/main/java/org/axonframework/samples/trader/orders/command/TransactionCommandHandler.java
orders/src/main/resources/META-INF/spring/orders-context.xml
orders/src/test/java/org/axonframework/samples/trader/orders/command/BuyTradeManagerSagaTest.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/PortfolioCommandHandlerTest.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/PortfolioManagementUserListenerTest.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/SellTradeManagerSagaTest.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/TransactionCommandHandlingTest.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/matchers/AddItemsToPortfolioCommandMatcher.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/matchers/BaseCommandMatcher.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/matchers/CancelItemReservationForPortfolioCommandMatcher.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/matchers/CancelMoneyReservationFromPortfolioCommandMatcher.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/matchers/CancelTransactionCommandMatcher.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/matchers/ConfirmItemReservationForPortfolioCommandMatcher.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/matchers/ConfirmMoneyReservationFromPortfolionCommandMatcher.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/matchers/ConfirmTransactionCommandMatcher.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/matchers/CreateBuyOrderCommandMatcher.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/matchers/CreateSellOrderCommandMatcher.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/matchers/DepositMoneyToPortfolioCommandMatcher.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/matchers/ExecutedTransactionCommandMatcher.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/matchers/ReserveMoneyFromPortfolioCommandMatcher.java
orders/src/test/java/org/axonframework/samples/trader/orders/command/matchers/ReservedItemsCommandMatcher.java
orders/src/test/resources/log4j.properties
pom.xml
query/pom.xml
query/src/main/java/org/axonframework/samples/trader/query/company/CompanyEntry.java
query/src/main/java/org/axonframework/samples/trader/query/company/CompanyListener.java
query/src/main/java/org/axonframework/samples/trader/query/company/repositories/CompanyQueryRepository.java
query/src/main/java/org/axonframework/samples/trader/query/orderbook/OrderBookEntry.java
query/src/main/java/org/axonframework/samples/trader/query/orderbook/OrderBookListener.java
query/src/main/java/org/axonframework/samples/trader/query/orderbook/OrderEntry.java
query/src/main/java/org/axonframework/samples/trader/query/orderbook/repositories/OrderBookQueryRepository.java
query/src/main/java/org/axonframework/samples/trader/query/portfolio/ItemEntry.java
query/src/main/java/org/axonframework/samples/trader/query/portfolio/PortfolioEntry.java
query/src/main/java/org/axonframework/samples/trader/query/portfolio/PortfolioItemEventListener.java
query/src/main/java/org/axonframework/samples/trader/query/portfolio/PortfolioMoneyEventListener.java
query/src/main/java/org/axonframework/samples/trader/query/portfolio/repositories/PortfolioQueryRepository.java
query/src/main/java/org/axonframework/samples/trader/query/tradeexecuted/TradeExecutedEntry.java
query/src/main/java/org/axonframework/samples/trader/query/tradeexecuted/repositories/TradeExecutedQueryRepository.java
query/src/main/java/org/axonframework/samples/trader/query/transaction/TransactionEntry.java
query/src/main/java/org/axonframework/samples/trader/query/transaction/TransactionEventListener.java
query/src/main/java/org/axonframework/samples/trader/query/transaction/TransactionState.java
query/src/main/java/org/axonframework/samples/trader/query/transaction/repositories/TransactionQueryRepository.java
query/src/main/resources/META-INF/spring/query-context.xml
query/src/test/java/org/axonframework/samples/trader/query/company/repositories/CompanyRepositoryIntegrationTest.java
query/src/test/java/org/axonframework/samples/trader/query/orderbook/OrderBookListenerIntegrationTest.java
query/src/test/java/org/axonframework/samples/trader/query/portfolio/PortfolioEntryMatcher.java
query/src/test/java/org/axonframework/samples/trader/query/portfolio/PortfolioEntryTest.java
query/src/test/java/org/axonframework/samples/trader/query/portfolio/PortfolioItemEventListenerTest.java
query/src/test/java/org/axonframework/samples/trader/query/transaction/TransactionEntryMatcher.java
query/src/test/java/org/axonframework/samples/trader/query/transaction/TransactionEventListenerTest.java
trade-engine/pom.xml
trade-engine/src/main/java/org/axonframework/samples/trader/tradeengine/command/Order.java
trade-engine/src/main/java/org/axonframework/samples/trader/tradeengine/command/OrderBook.java
trade-engine/src/main/java/org/axonframework/samples/trader/tradeengine/command/OrderBookCommandHandler.java
trade-engine/src/main/resources/META-INF/spring/trade-engine-context.xml
trade-engine/src/test/java/org/axonframework/samples/trader/tradeengine/command/OrderBookCommandHandlerTest.java
users-query/pom.xml
users-query/src/main/java/org/axonframework/samples/trader/query/users/UserEntry.java
users-query/src/main/java/org/axonframework/samples/trader/query/users/UserListener.java
users-query/src/main/java/org/axonframework/samples/trader/query/users/repositories/UserQueryRepository.java
users-query/src/main/resources/META-INF/spring/users-query-context.xml
users/pom.xml
users/src/main/java/org/axonframework/samples/trader/users/command/User.java
users/src/main/java/org/axonframework/samples/trader/users/command/UserCommandHandler.java
users/src/main/java/org/axonframework/samples/trader/users/util/DigestUtils.java
users/src/main/resources/META-INF/spring/users-context.xml
users/src/test/java/org/axonframework/samples/trader/app/command/user/UserCommandHandlerTest.java
vertx-ui/build.gradle
vertx-ui/trader/OrderHandler.groovy
vertx-ui/trader/TradeWatcher.groovy
web-ui/pom.xml
web-ui/src/main/java/org/axonframework/samples/trader/webui/admin/AdminController.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/companies/CompanyController.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/dashboard/DashboardController.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/init/CloudApplicationContextInitializer.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/init/DBInit.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/init/MongoController.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/init/RunDBInitializerWhenNeeded.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/order/AbstractOrder.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/order/BuyOrder.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/order/CreateOrder.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/order/OrderBookController.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/order/SellOrder.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/rest/RestController.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/security/TraderAuthenticationProvider.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/security/UserController.java
web-ui/src/main/java/org/axonframework/samples/trader/webui/util/SecurityUtil.java
web-ui/src/main/resources/META-INF/spring/security-context.xml
web-ui/src/main/resources/log4j.properties
web-ui/src/main/resources/messages.properties
web-ui/src/main/webapp/WEB-INF/decorators.xml
web-ui/src/main/webapp/WEB-INF/decorators/master.jsp
web-ui/src/main/webapp/WEB-INF/dispatcher-servlet.xml
web-ui/src/main/webapp/WEB-INF/jsp/admin/portfolio/detail.jsp
web-ui/src/main/webapp/WEB-INF/jsp/admin/portfolio/list.jsp
web-ui/src/main/webapp/WEB-INF/jsp/company/buy.jsp
web-ui/src/main/webapp/WEB-INF/jsp/company/details.jsp
web-ui/src/main/webapp/WEB-INF/jsp/company/form-include.jsp
web-ui/src/main/webapp/WEB-INF/jsp/company/list.jsp
web-ui/src/main/webapp/WEB-INF/jsp/company/sell.jsp
web-ui/src/main/webapp/WEB-INF/jsp/dashboard/index.jsp
web-ui/src/main/webapp/WEB-INF/jsp/data/collection.jsp
web-ui/src/main/webapp/WEB-INF/jsp/data/collections.jsp
web-ui/src/main/webapp/WEB-INF/jsp/data/info.jsp
web-ui/src/main/webapp/WEB-INF/jsp/include.jsp
web-ui/src/main/webapp/WEB-INF/jsp/index.jsp
web-ui/src/main/webapp/WEB-INF/jsp/orderbook/list.jsp
web-ui/src/main/webapp/WEB-INF/jsp/orderbook/orders.jsp
web-ui/src/main/webapp/WEB-INF/jsp/orderbook/socket.jsp
web-ui/src/main/webapp/WEB-INF/jsp/user/detail.jsp
web-ui/src/main/webapp/WEB-INF/jsp/user/list.jsp
web-ui/src/main/webapp/WEB-INF/messages/fields.properties
web-ui/src/main/webapp/WEB-INF/messages/validation.properties
web-ui/src/main/webapp/WEB-INF/web.xml
web-ui/src/main/webapp/favicon.ico
web-ui/src/main/webapp/index.html
web-ui/src/main/webapp/js/jquery-1.6.4.min.js
web-ui/src/main/webapp/js/jquery.tablesorter.min.js
web-ui/src/main/webapp/js/sockjs-0.2.1.min.js
web-ui/src/main/webapp/js/vertxbus-1.1.0-final.js
web-ui/src/main/webapp/login.jsp
web-ui/src/main/webapp/style/bootstrap-1.3.0.min.css
web-ui/src/main/webapp/style/bootstrap-1.4.0.min.css
web-ui/src/main/webapp/style/main.css
web-ui/src/test/java/org/axonframework/samples/trader/test/CommandCreator.groovy
web-ui/src/test/java/org/axonframework/samples/trader/test/CommandSender.groovy
web-ui/src/test/java/org/axonframework/samples/trader/test/ShootCommand.groovy
web-ui/src/test/resources/log4j.properties
Download
Click the following link to download Axon-trader-master.zip.
Axon-trader-master.zip