Tabnine Logo
org.axonframework.config
Code IndexAdd Tabnine to your IDE (free)

How to use org.axonframework.config

Best Java code snippets using org.axonframework.config (Showing top 20 results out of 315)

origin: AxonFramework/AxonFramework

@Override
public String processingGroup() {
  ensureInitialized();
  return config.eventProcessingConfiguration()
         .sagaProcessingGroup(configurer.type);
}
origin: AxonFramework/AxonFramework

  /**
   * Builds the configuration and starts it immediately. It is not recommended to change any configuration on this
   * Configurer once this method is called.
   *
   * @return The started configuration
   */
  default Configuration start() {
    Configuration configuration = buildConfiguration();
    configuration.start();
    return configuration;
  }
}
origin: AxonFramework/AxonFramework

@Override
public ListenerInvocationErrorHandler listenerInvocationErrorHandler() {
  ensureInitialized();
  return config.eventProcessingConfiguration()
         .listenerInvocationErrorHandler(processingGroup());
}
origin: AxonFramework/AxonFramework

/**
 * Configures an Aggregate using default settings. This means the aggregate is expected to be Event Sourced if an
 * Event Store present in the configuration. Otherwise, an explicit repository must be configured and the
 * {@link #configureAggregate(AggregateConfiguration)} must be used to register the aggregate.
 *
 * @param aggregate The aggregate type to register with the Configuration
 * @param <A>       The type of aggregate
 * @return the current instance of the Configurer, for chaining purposes
 */
default <A> Configurer configureAggregate(Class<A> aggregate) {
  return configureAggregate(AggregateConfigurer.defaultConfiguration(aggregate));
}
origin: AxonFramework/AxonFramework

/**
 * Prepare the registered modules for initialization. This ensures all lifecycle handlers are registered.
 */
protected void prepareModules() {
  modules.forEach(module -> {
    initHandlers.add(new ConsumerHandler(module.phase(), module::initialize));
    startHandlers.add(new RunnableHandler(module.phase(), module::start));
    shutdownHandlers.add(new RunnableHandler(module.phase(), module::shutdown));
  });
}
origin: AxonFramework/AxonFramework

/**
 * Registers a {@link Function} that builds an Event Handler instance.
 *
 * @param eventHandlerBuilder a {@link Function} that builds an Event Handler instance.
 * @return the current instance of the Configurer, for chaining purposes.
 */
default Configurer registerEventHandler(Function<Configuration, Object> eventHandlerBuilder) {
  eventProcessing().registerEventHandler(eventHandlerBuilder);
  return this;
}
origin: AxonFramework/AxonFramework

/**
 * Configures the given Transaction Manager to use in this configuration. The builder receives the Configuration as
 * input and is expected to return a fully initialized {@link TransactionManager}
 * instance.
 *
 * @param transactionManagerBuilder The builder function for the {@link TransactionManager}
 * @return the current instance of the Configurer, for chaining purposes
 */
default Configurer configureTransactionManager(Function<Configuration, TransactionManager> transactionManagerBuilder) {
  return registerComponent(TransactionManager.class, transactionManagerBuilder);
}
origin: AxonFramework/AxonFramework

@Override
public AbstractSagaManager<S> manager() {
  ensureInitialized();
  return manager.get();
}
origin: AxonFramework/AxonFramework

@Override
public SagaStore sagaStore() {
  ensureInitialized();
  return sagaStore.get();
}
origin: AxonFramework/AxonFramework

  @Override
  public void afterPropertiesSet() {
    if (!initialized) {
      initialized = true;
      eventProcessingConfiguration.initialize(axonConfiguration);
    }
  }
}
origin: AxonFramework/AxonFramework

/**
 * Obtains an Saga {@link EventProcessor} implementation for the given {@code sagaType}.
 *
 * @param sagaType the type of Saga for which to get the Event Processor
 * @param <T>      the type of the expected {@link EventProcessor}
 * @return an {@link Optional} specifying whether an {@link EventProcessor} for the given {@link SagaConfiguration}
 * exists
 */
default <T extends EventProcessor> Optional<T> sagaEventProcessor(Class<?> sagaType) {
  return eventProcessorByProcessingGroup(sagaProcessingGroup(sagaType));
}
origin: AxonFramework/AxonFramework

@Override
public Configurer configureEventSerializer(Function<Configuration, Serializer> eventSerializerBuilder) {
  eventSerializer.update(eventSerializerBuilder);
  return this;
}
origin: AxonFramework/AxonFramework

@Override
public Configurer configureMessageMonitor(Class<?> componentType, MessageMonitorFactory messageMonitorFactory) {
  messageMonitorFactoryBuilder.add(componentType, messageMonitorFactory);
  return this;
}
origin: AxonFramework/AxonFramework

@Override
public void stop() {
  eventProcessingConfiguration.shutdown();
  running = false;
}
origin: AxonFramework/AxonFramework

/**
 * Configures the given Resource Injector to use for Sagas in this configuration. The builder receives the
 * Configuration as input and is expected to return a fully initialized {@link ResourceInjector} instance.
 *
 * @param resourceInjectorBuilder The builder function for the {@link ResourceInjector}
 * @return the current instance of the Configurer, for chaining purposes
 */
default Configurer configureResourceInjector(Function<Configuration, ResourceInjector> resourceInjectorBuilder) {
  return registerComponent(ResourceInjector.class, resourceInjectorBuilder);
}
origin: AxonFramework/AxonFramework

@Override
public SagaStore<? super S> store() {
  ensureInitialized();
  return store.get();
}
origin: AxonFramework/AxonFramework

@Override
public Configurer configureMessageSerializer(Function<Configuration, Serializer> messageSerializerBuilder) {
  messageSerializer.update(messageSerializerBuilder);
  return this;
}
origin: AxonFramework/AxonFramework

@Override
public Configurer configureMessageMonitor(Class<?> componentType,
                     String componentName,
                     MessageMonitorFactory messageMonitorFactory) {
  messageMonitorFactoryBuilder.add(componentType, componentName, messageMonitorFactory);
  return this;
}
origin: AxonFramework/AxonFramework

@Override
public SagaRepository<S> repository() {
  ensureInitialized();
  return repository.get();
}
origin: AxonFramework/AxonFramework

@Override
public EventProcessingConfigurer registerDefaultErrorHandler(
    Function<Configuration, ErrorHandler> errorHandlerBuilder) {
  this.defaultErrorHandler.update(errorHandlerBuilder);
  return this;
}
org.axonframework.config

Most used classes

  • Configurer
    Entry point of the Axon Configuration API. Using DefaultConfigurer#defaultConfiguration(), you will
  • Configuration
    Interface describing the Global Configuration for Axon components. It provides access to the compone
  • ProcessingGroup
  • DefaultConfigurer
    Entry point of the Axon Configuration API. It implements the Configurer interface, providing access
  • SagaConfiguration
    Module Configuration implementation that defines a Saga. This component allows the configuration of
  • EventHandlingConfiguration,
  • EventProcessingConfiguration,
  • EventProcessingConfigurer,
  • AggregateConfiguration,
  • Component,
  • ConfigurationScopeAwareProvider,
  • EventProcessingModule,
  • ModuleConfiguration,
  • KafkaConfigBuilder$ConsumerConfiguration,
  • KafkaConfigBuilder,
  • ConfigurationParameterResolverFactory,
  • ConfigurationResourceInjector,
  • ConfigurerModule,
  • DefaultConfigurer$ConsumerHandler
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