congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
EventProcessingConfiguration.eventProcessor
Code IndexAdd Tabnine to your IDE (free)

How to use
eventProcessor
method
in
org.axonframework.config.EventProcessingConfiguration

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

origin: AxonFramework/AxonFramework

public EventProcessor getEventProcessor(String processorName){
  return this.eventProcessingConfiguration
      .eventProcessor(processorName)
      .orElseThrow(() -> new RuntimeException("Processor not found"));
}
origin: AxonFramework/AxonFramework

/**
 * Returns the {@link EventProcessor} with the given {@code name} if present, matching the given
 * {@code expectedType}.
 *
 * @param name         a {@link String} specifying the name of the {@link EventProcessor} to return
 * @param expectedType the type of the {@link EventProcessor} to return
 * @param <T>          the type of the expected {@link EventProcessor}
 * @return an {@link Optional} referencing the {@link EventProcessor}, if present and of expected type
 */
default <T extends EventProcessor> Optional<T> eventProcessor(String name, Class<T> expectedType) {
  return eventProcessor(name).filter(expectedType::isInstance).map(expectedType::cast);
}
origin: org.axonframework/axon-core

/**
 * Returns the Event Processor with the given {@code name}, if present and of the given {@code expectedType}.
 *
 * @param name         The name of the processor to return
 * @param expectedType The type of processor expected
 * @param <T>          The type of processor expected
 * @return an Optional referencing the processor, if present and of expected type
 */
public <T extends EventProcessor> Optional<T> eventProcessor(String name, Class<T> expectedType) {
  return eventProcessor(name).filter(expectedType::isInstance).map(expectedType::cast);
}
origin: org.axonframework/axon-configuration

/**
 * Returns the {@link EventProcessor} with the given {@code name} if present, matching the given
 * {@code expectedType}.
 *
 * @param name         a {@link String} specifying the name of the {@link EventProcessor} to return
 * @param expectedType the type of the {@link EventProcessor} to return
 * @param <T>          the type of the expected {@link EventProcessor}
 * @return an {@link Optional} referencing the {@link EventProcessor}, if present and of expected type
 */
default <T extends EventProcessor> Optional<T> eventProcessor(String name, Class<T> expectedType) {
  return eventProcessor(name).filter(expectedType::isInstance).map(expectedType::cast);
}
origin: org.axonframework/axon-server-connector

public EventProcessor getEventProcessor(String processorName){
  return this.eventProcessingConfiguration
      .eventProcessor(processorName)
      .orElseThrow(() -> new RuntimeException("Processor not found"));
}
origin: org.axonframework/axon-core

/**
 * Register the given {@code interceptorBuilder} to build an Message Handling Interceptor for the Event Processor
 * with given {@code processorName}.
 * <p>
 * The {@code interceptorBuilder} may return {@code null}, in which case the return value is ignored.
 *
 * @param processorName      The name of the processor to register the interceptor on
 * @param interceptorBuilder The function providing the interceptor to register, or {@code null}
 * @return event processing configuration for chaining purposes
 */
public EventProcessingConfiguration registerHandlerInterceptor(String processorName,
                                Function<Configuration, MessageHandlerInterceptor<? super EventMessage<?>>> interceptorBuilder) {
  if (configuration != null) {
    eventProcessor(processorName).ifPresent(eventProcessor -> eventProcessor
        .registerInterceptor(interceptorBuilder.apply(configuration)));
  }
  handlerInterceptorsBuilders.computeIfAbsent(processorName, k -> new ArrayList<>())
                .add(interceptorBuilder);
  return this;
}
origin: org.axonframework/axon-core

/**
 * Returns the Event Processor with the given {@code name}, if present. This method also returns an unresolved
 * optional if the Processor was configured, but it hasn't been assigned any Event Handlers.
 *
 * @param name The name of the processor to return
 * @return an Optional referencing the processor, if present.
 * @deprecated use {@link EventProcessingConfiguration#eventProcessor(String)} instead
 */
@Deprecated
public <T extends EventProcessor> Optional<T> getProcessor(String name) {
  Assert.state(config != null, () -> "Configuration is not initialized yet");
  //noinspection unchecked
  return (Optional<T>) config.eventProcessingConfiguration().eventProcessor(name);
}
origin: org.axonframework/axon-core

/**
 * Returns the Event Processor with the given {@code name}, if present and of the given {@code expectedType}. This
 * method also returns an empty optional if the Processor was configured, but it hasn't been assigned any Event
 * Handlers.
 *
 * @param name         The name of the processor to return
 * @param expectedType The type of processor expected
 * @param <T>          The type of processor expected
 * @return an Optional referencing the processor, if present and of expected type.
 * @deprecated use {@link EventProcessingConfiguration#eventProcessor(String, Class)} instead
 */
@Deprecated
public <T extends EventProcessor> Optional<T> getProcessor(String name, Class<T> expectedType) {
  Assert.state(config != null, () -> "Configuration is not initialized yet");
  return config.eventProcessingConfiguration().eventProcessor(name, expectedType);
}
org.axonframework.configEventProcessingConfigurationeventProcessor

Javadoc

Obtains an EventProcessor through the given name.

Popular methods of EventProcessingConfiguration

  • eventProcessors
    Obtains all registered event processors. This method is to be called after Event Processor Registry
  • eventProcessorByProcessingGroup
    Returns the Event Processor by the given processingGroup, if present and of the given expectedType.
  • registerSubscribingEventProcessor
    Register a subscribing event processor with given name that subscribes to the given messageSource. T
  • <init>
  • buildEventProcessor
  • configureErrorHandler
    Configures the default org.axonframework.eventhandling.ErrorHandler for any org.axonframework.eventh
  • configureMessageMonitor
    Configures the factory to create the Message Monitor for the EventProcessor of the given name. This
  • configureRollbackConfiguration
    Configures a RollbackConfiguration for the EventProcessor of the given name. This overrides the defa
  • configureTransactionManager
    Configures a TransactionManager for the EventProcessor of the given name. This overrides the default
  • getErrorHandler
  • getMessageMonitor
  • getRollbackConfiguration
  • getMessageMonitor,
  • getRollbackConfiguration,
  • getTransactionManager,
  • listenerInvocationErrorHandler,
  • processorNameForProcessingGroup,
  • registerEventProcessor,
  • registerEventProcessorFactory,
  • registerHandlerInterceptor,
  • registerHandlerInvoker

Popular in Java

  • Finding current android device location
  • runOnUiThread (Activity)
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Top Sublime Text plugins
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