Tabnine Logo
ProcessingGroup.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.axonframework.config.ProcessingGroup
constructor

Best Java code snippets using org.axonframework.config.ProcessingGroup.<init> (Showing top 19 results out of 315)

origin: pivotalsoftware/ESarch

@Service
@ProcessingGroup("commandPublishingEventHandlers")
public class PortfolioManagementUserListener {

  private static final Logger logger = LoggerFactory.getLogger(PortfolioManagementUserListener.class);

  private final CommandGateway commandGateway;

  public PortfolioManagementUserListener(CommandGateway commandGateway) {
    this.commandGateway = commandGateway;
  }

  @EventHandler
  public void on(UserCreatedEvent event) {
    logger.debug("About to dispatch a new command to create a Portfolio for the new user {}", event.getUserId());
    commandGateway.send(new CreatePortfolioCommand(new PortfolioId(), event.getUserId()));
  }
}

origin: AxonFramework/Axon-trader

/**
 * Listener that is used to create a new portfolio for each new user that is created.
 * TODO #28 the Portfolio aggregate should be instantiated from the Company aggregate, as is possible since axon 3.3
 */
@Service
@ProcessingGroup("commandPublishingEventHandlers")
public class PortfolioManagementUserListener {

  private static final Logger logger = LoggerFactory.getLogger(PortfolioManagementUserListener.class);

  private final CommandGateway commandGateway;

  @Autowired
  public PortfolioManagementUserListener(CommandGateway commandGateway) {
    this.commandGateway = commandGateway;
  }

  @EventHandler
  public void on(UserCreatedEvent event) {
    logger.debug("About to dispatch a new command to create a Portfolio for the new user {}", event.getUserId());
    commandGateway.send(new CreatePortfolioCommand(new PortfolioId(), event.getUserId()));
  }
}

origin: pivotalsoftware/ESarch

@Service
@ProcessingGroup("commandPublishingEventHandlers")
public class CompanyOrderBookListener {

  private static final Logger logger = LoggerFactory.getLogger(CompanyOrderBookListener.class);

  private final CommandGateway commandGateway;

  public CompanyOrderBookListener(CommandGateway commandGateway) {
    this.commandGateway = commandGateway;
  }

  @EventHandler
  public void on(CompanyCreatedEvent event) {
    logger.debug("About to dispatch a new command to create an OrderBook for the company {}", event.getCompanyId());

    OrderBookId orderBookId = new OrderBookId();
    commandGateway.send(new CreateOrderBookCommand(orderBookId));
    commandGateway.send(new AddOrderBookToCompanyCommand(event.getCompanyId(), orderBookId));
  }
}

origin: AxonFramework/Axon-trader

@Service
@ProcessingGroup("userQueryModel")
public class UserEventHandler {

  private final UserViewRepository userRepository;

  @Autowired
  public UserEventHandler(UserViewRepository userRepository) {
    this.userRepository = userRepository;
  }

  @EventHandler
  public void on(UserCreatedEvent event) {
    UserView userView = new UserView();

    userView.setIdentifier(event.getUserId().getIdentifier());
    userView.setName(event.getName());
    userView.setUsername(event.getUsername());
    userView.setPassword(event.getPassword());

    userRepository.save(userView);
  }
}

origin: AxonFramework/Axon-trader

@Service
@ProcessingGroup("queryModel")
public class CompanyEventHandler {

  private final CompanyViewRepository companyRepository;

  @Autowired
  public CompanyEventHandler(CompanyViewRepository companyRepository) {
    this.companyRepository = companyRepository;
  }

  @EventHandler
  public void on(CompanyCreatedEvent event) {
    CompanyView companyView = new CompanyView();

    companyView.setIdentifier(event.getCompanyId().getIdentifier());
    companyView.setValue(event.getCompanyValue());
    companyView.setAmountOfShares(event.getAmountOfShares());
    companyView.setTradeStarted(true);
    companyView.setName(event.getCompanyName());

    companyRepository.save(companyView);
  }
}

origin: AxonFramework/Axon-trader

/**
 * This listener is used to create order book instances when we have created a new company</p>
 * TODO #28 the OrderBook aggregate should be instantiated from the Company aggregate, as is possible since axon 3.3
 **/
@Service
@ProcessingGroup("commandPublishingEventHandlers")
public class CompanyOrderBookListener {

  private static final Logger logger = LoggerFactory.getLogger(CompanyOrderBookListener.class);

  private final CommandGateway commandGateway;

  @Autowired
  public CompanyOrderBookListener(CommandGateway commandGateway) {
    this.commandGateway = commandGateway;
  }

  @EventHandler
  public void on(CompanyCreatedEvent event) {
    logger.debug("About to dispatch a new command to create an OrderBook for the company {}", event.getCompanyId());

    OrderBookId orderBookId = new OrderBookId();
    commandGateway.send(new CreateOrderBookCommand(orderBookId));
    commandGateway.send(new AddOrderBookToCompanyCommand(event.getCompanyId(), orderBookId));
  }
}

origin: pivotalsoftware/ESarch

@Service
@ProcessingGroup("userQueryModel")
public class UserEventHandler {
origin: vvgomes/event-driven-restaurant

@Component
@ProcessingGroup("amqpEvents")
@AllArgsConstructor
@FieldDefaults(level = PRIVATE, makeFinal = true)
public class MenuItemAddedEventListener {

  @Autowired
  MenuItemRepository menu;

  @EventHandler
  public void on(MenuItemAddedEvent event) {
    Logger
      .getInstance(getClass())
      .info(format("Handling event: %s", event));

    menu.save(new MenuItem(event.getId(), event.getPrice()));
  }
}

origin: vvgomes/event-driven-restaurant

@Component
@ProcessingGroup("amqpEvents")
@AllArgsConstructor
@FieldDefaults(level = PRIVATE, makeFinal = true)
public class MenuItemRemovedEventListener {

  @Autowired
  MenuItemRepository menu;

  @EventHandler
  public void on(MenuItemRemovedEvent event) {
    Logger
      .getInstance(getClass())
      .info(format("Handling event: %s", event));

    menu.delete(event.getId());
  }
}

origin: vvgomes/event-driven-restaurant

@Component
@ProcessingGroup("amqpEvents")
@AllArgsConstructor
@FieldDefaults(level = PRIVATE, makeFinal = true)
public class CustomerSignedUpEventListener {

  @Autowired
  CustomerRepository customers;

  @EventHandler
  public void on(CustomerSignedUpEvent event) {
    Logger
      .getInstance(getClass())
      .info(format("Handling event: %s", event));

    customers.save(new Customer(event.getId()));
  }
}

origin: AxonFramework/Axon-trader

@Service
@ProcessingGroup("queryModel")
public class PortfolioItemEventHandler {
origin: AxonFramework/Axon-trader

@Service
@ProcessingGroup("queryModel")
public class PortfolioMoneyEventHandler {
origin: vvgomes/event-driven-restaurant

@Component
@ProcessingGroup("amqpEvents")
@AllArgsConstructor
@FieldDefaults(level = PRIVATE, makeFinal = true)
public class ItemAddedToOrderEventListener {

  @Autowired
  ItemRepository items;

  @EventHandler
  public void on(ItemAddedToOrderEvent event) {
    Logger
      .getInstance(getClass())
      .info(format("Handling event: %s", event));

    Optional
      .ofNullable(items.findOne(event.getMenuItemId()))
      .map(Item::increasePopularity)
      .ifPresent(items::save);
  }
}

origin: AxonFramework/Axon-trader

@Service
@ProcessingGroup("queryModel")
public class OrderBookEventHandler {
origin: vvgomes/event-driven-restaurant

@Component
@ProcessingGroup("amqpEvents")
@AllArgsConstructor
@FieldDefaults(level = PRIVATE, makeFinal = true)
public class AddressAddedEventListener {

  @Autowired
  CustomerRepository customers;

  @Autowired
  AddressRepository addresses;

  @EventHandler
  public void on(AddressAddedEvent event) {
    Logger
      .getInstance(getClass())
      .info(format("Handling event: %s", event));

    Optional
      .ofNullable(customers.findOne(event.getCustomerId()))
      .map(customer -> new Address(
        event.getAddressId(),
        event.getLocation(),
        customer))
      .ifPresent(addresses::save);
  }
}

origin: AxonFramework/Axon-trader

@Service
@ProcessingGroup("queryModel")
public class TransactionEventHandler {
origin: pivotalsoftware/ESarch

@Service
@ProcessingGroup("trading")
public class TransactionEventHandler {
origin: pivotalsoftware/ESarch

@Service
@ProcessingGroup("trading")
public class PortfolioEventHandler {
origin: pivotalsoftware/ESarch

@Service
@ProcessingGroup("trading")
public class OrderBookEventHandler {
org.axonframework.configProcessingGroup<init>

Popular methods of ProcessingGroup

  • value

Popular in Java

  • Parsing JSON documents to java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now