congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
MessageHandler
Code IndexAdd Tabnine to your IDE (free)

How to use
MessageHandler
in
org.axonframework.messaging

Best Java code snippets using org.axonframework.messaging.MessageHandler (Showing top 11 results out of 315)

origin: AxonFramework/AxonFramework

  @Override
  public Object proceed() throws Exception {
    if (chain.hasNext()) {
      return chain.next().handle(unitOfWork, this);
    } else {
      return handler.handle(unitOfWork.getMessage());
    }
  }
}
origin: AxonFramework/AxonFramework

@Override
public Object handle(CommandMessage<?> commandMessage) throws Exception {
  return handlers.stream().filter(eh -> eh.canHandle(commandMessage))
          .findFirst()
          .orElseThrow(() -> new NoHandlerForCommandException(commandMessage))
          .handle(commandMessage);
}
origin: AxonFramework/AxonFramework

@Override
public boolean canHandle(CommandMessage<?> message) {
  return handlers.stream().anyMatch(ch -> ch.canHandle(message));
}
origin: org.axonframework/axon-modelling

@Override
public boolean canHandle(CommandMessage<?> message) {
  return handlers.stream().anyMatch(ch -> ch.canHandle(message));
}
origin: AxonFramework/AxonFramework

/**
 * Resets this entry, preparing it to run given {@code callable} from within the {@code invocationInterceptorChain}.
 *
 * @param callable              a {@link Callable} which performs a task in the {@code invocationInterceptorChain},
 *                              for example publishing a scheduled {@link org.axonframework.deadline.DeadlineMessage}
 * @param newInvokerSegmentId   The SegmentId of the invoker that should process this entry
 * @param newPublisherSegmentId The SegmentId of the publisher that should process this entry
 * @param newCallback           The callback to report the result of command execution to
 */
public void resetAsCallable(Callable<Object> callable,
              int newInvokerSegmentId,
              int newPublisherSegmentId,
              BlacklistDetectingCallback<Object, Object> newCallback) {
  this.isRecoverEntry = false;
  this.invokerSegmentId = newInvokerSegmentId;
  this.publisherSegmentId = newPublisherSegmentId;
  this.callback = newCallback;
  result = null;
  aggregateIdentifier = null;
  invocationInterceptorChain = callable::call;
  publisherInterceptorChain = () -> repeatingCommandHandler.handle(null);
  reset(null);
}
origin: org.axonframework/axon-modelling

@Override
public Object handle(CommandMessage<?> commandMessage) throws Exception {
  return handlers.stream().filter(eh -> eh.canHandle(commandMessage))
          .findFirst()
          .orElseThrow(() -> new NoHandlerForCommandException(commandMessage))
          .handle(commandMessage);
}
origin: org.axonframework/axon-core

@Override
public Object handle(CommandMessage<?> commandMessage) throws Exception {
  return handlers.get(commandMessage.getCommandName()).handle(commandMessage);
}
origin: org.axonframework/axon-core

  @Override
  public Object proceed() throws Exception {
    if (chain.hasNext()) {
      return chain.next().handle(unitOfWork, this);
    } else {
      return handler.handle(unitOfWork.getMessage());
    }
  }
}
origin: org.axonframework/axon-messaging

  @Override
  public Object proceed() throws Exception {
    if (chain.hasNext()) {
      return chain.next().handle(unitOfWork, this);
    } else {
      return handler.handle(unitOfWork.getMessage());
    }
  }
}
origin: org.axonframework/axon-core

/**
 * Resets this entry, preparing it to run given {@code callable} from within the {@code invocationInterceptorChain}.
 *
 * @param callable              a {@link Callable} which performs a task in the {@code invocationInterceptorChain},
 *                              for example publishing a scheduled {@link org.axonframework.deadline.DeadlineMessage}
 * @param newInvokerSegmentId   The SegmentId of the invoker that should process this entry
 * @param newPublisherSegmentId The SegmentId of the publisher that should process this entry
 * @param newCallback           The callback to report the result of command execution to
 */
public void resetAsCallable(Callable<Object> callable,
              int newInvokerSegmentId,
              int newPublisherSegmentId,
              BlacklistDetectingCallback<Object, Object> newCallback) {
  this.isRecoverEntry = false;
  this.invokerSegmentId = newInvokerSegmentId;
  this.publisherSegmentId = newPublisherSegmentId;
  this.callback = newCallback;
  result = null;
  exceptionResult = null;
  aggregateIdentifier = null;
  invocationInterceptorChain = callable::call;
  publisherInterceptorChain = () -> repeatingCommandHandler.handle(null);
  reset(null);
}
origin: org.axonframework/axon-disruptor

/**
 * Resets this entry, preparing it to run given {@code callable} from within the {@code invocationInterceptorChain}.
 *
 * @param callable              a {@link Callable} which performs a task in the {@code invocationInterceptorChain},
 *                              for example publishing a scheduled {@link org.axonframework.deadline.DeadlineMessage}
 * @param newInvokerSegmentId   The SegmentId of the invoker that should process this entry
 * @param newPublisherSegmentId The SegmentId of the publisher that should process this entry
 * @param newCallback           The callback to report the result of command execution to
 */
public void resetAsCallable(Callable<Object> callable,
              int newInvokerSegmentId,
              int newPublisherSegmentId,
              BlacklistDetectingCallback<Object, Object> newCallback) {
  this.isRecoverEntry = false;
  this.invokerSegmentId = newInvokerSegmentId;
  this.publisherSegmentId = newPublisherSegmentId;
  this.callback = newCallback;
  result = null;
  aggregateIdentifier = null;
  invocationInterceptorChain = callable::call;
  publisherInterceptorChain = () -> repeatingCommandHandler.handle(null);
  reset(null);
}
org.axonframework.messagingMessageHandler

Javadoc

Interface for a component that processes Messages.

Most used methods

  • handle
    Handles the given message.
  • canHandle
    Indicates whether this handler can handle the given message

Popular in Java

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
  • getSharedPreferences (Context)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JCheckBox (javax.swing)
  • JTable (javax.swing)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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