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
  • scheduleAtFixedRate (ScheduledExecutorService)
  • notifyDataSetChanged (ArrayAdapter)
  • setScale (BigDecimal)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • 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