Uses of Interface
org.axonframework.commandhandling.CommandMessage
Packages that use CommandMessage
Package
Description
Classes that implement the concept of command handling using explicit command objects.
-
Uses of CommandMessage in org.axonframework.commandhandling
Classes in org.axonframework.commandhandling that implement CommandMessageModifier and TypeClassDescriptionclassImplementation of the CommandMessage that takes all properties as constructor parameters.Methods in org.axonframework.commandhandling that return CommandMessageModifier and TypeMethodDescriptionCommandMessage.andMetaData(Map<String, ?> metaData) Returns a copy of this CommandMessage with it MetaData merged with the givenmetaData.static <C> CommandMessage<C>GenericCommandMessage.asCommandMessage(Object command) Returns the given command as aCommandMessage.protected <C> CommandMessage<C>SimpleCommandBus.intercept(CommandMessage<C> command) Invokes all the dispatch interceptors.<T> CommandMessage<T>CommandBusSpanFactory.propagateContext(CommandMessage<T> commandMessage) Propagates the context of the current span to the given command message.<T> CommandMessage<T>DefaultCommandBusSpanFactory.propagateContext(CommandMessage<T> commandMessage) CommandMessage.withMetaData(Map<String, ?> metaData) Returns a copy of this CommandMessage with the givenmetaData.Methods in org.axonframework.commandhandling that return types with arguments of type CommandMessageModifier and TypeMethodDescriptionMessageHandler<? super CommandMessage<?>>DuplicateCommandHandlerResolver.resolve(String commandName, MessageHandler<? super CommandMessage<?>> registeredHandler, MessageHandler<? super CommandMessage<?>> candidateHandler) Chooses what to do when a duplicate handler is registered, returning the handler that should be selected for command handling, or otherwise throwing an exception to reject registration altogether.MessageHandler<? super CommandMessage<?>>FailingDuplicateCommandHandlerResolver.resolve(String commandName, MessageHandler<? super CommandMessage<?>> registeredHandler, MessageHandler<? super CommandMessage<?>> candidateHandler) MessageHandler<? super CommandMessage<?>>LoggingDuplicateCommandHandlerResolver.resolve(String commandName, MessageHandler<? super CommandMessage<?>> registeredHandler, MessageHandler<? super CommandMessage<?>> candidateHandler) Methods in org.axonframework.commandhandling with parameters of type CommandMessageModifier and TypeMethodDescriptionbooleanAnnotationCommandHandlerAdapter.canHandle(CommandMessage<?> message) CommandBusSpanFactory.createDispatchCommandSpan(CommandMessage<?> commandMessage, boolean distributed) Creates a span for the dispatching of a command.DefaultCommandBusSpanFactory.createDispatchCommandSpan(CommandMessage<?> commandMessage, boolean distributed) CommandBusSpanFactory.createHandleCommandSpan(CommandMessage<?> commandMessage, boolean distributed) Creates a span for the handling of a command.DefaultCommandBusSpanFactory.createHandleCommandSpan(CommandMessage<?> commandMessage, boolean distributed) <C> voidCommandBus.dispatch(CommandMessage<C> command) Dispatch the givencommandto the CommandHandler subscribed to the givencommand's name.<C,R> void CommandBus.dispatch(CommandMessage<C> command, CommandCallback<? super C, ? super R> callback) Dispatch the givencommandto the CommandHandler subscribed to the givencommand's name.<C> voidSimpleCommandBus.dispatch(CommandMessage<C> command) <C,R> void SimpleCommandBus.dispatch(CommandMessage<C> command, CommandCallback<? super C, ? super R> callback) protected <C,R> void SimpleCommandBus.doDispatch(CommandMessage<C> command, CommandCallback<? super C, ? super R> callback) Performs the actual dispatching logic.AnnotationCommandHandlerAdapter.handle(CommandMessage<?> command) Invokes the@CommandHandlerannotated method that accepts the givencommand.protected <C,R> void AsynchronousCommandBus.handle(CommandMessage<C> command, MessageHandler<? super CommandMessage<?>> handler, CommandCallback<? super C, ? super R> callback) protected <C,R> void SimpleCommandBus.handle(CommandMessage<C> command, MessageHandler<? super CommandMessage<?>> handler, CommandCallback<? super C, ? super R> callback) Performs the actual handling logic.protected <C> CommandMessage<C>SimpleCommandBus.intercept(CommandMessage<C> command) Invokes all the dispatch interceptors.voidCommandCallback.onResult(CommandMessage<? extends C> commandMessage, CommandResultMessage<? extends R> commandResultMessage) Invoked when command handling execution is completed.voidMonitorAwareCallback.onResult(CommandMessage<? extends C> commandMessage, CommandResultMessage<? extends R> commandResultMessage) voidWrappedCommandCallback.onResult(CommandMessage<? extends C> commandMessage, CommandResultMessage<? extends R> commandResultMessage) <T> CommandMessage<T>CommandBusSpanFactory.propagateContext(CommandMessage<T> commandMessage) Propagates the context of the current span to the given command message.<T> CommandMessage<T>DefaultCommandBusSpanFactory.propagateContext(CommandMessage<T> commandMessage) Method parameters in org.axonframework.commandhandling with type arguments of type CommandMessageModifier and TypeMethodDescriptionprotected <C,R> void AsynchronousCommandBus.handle(CommandMessage<C> command, MessageHandler<? super CommandMessage<?>> handler, CommandCallback<? super C, ? super R> callback) protected <C,R> void SimpleCommandBus.handle(CommandMessage<C> command, MessageHandler<? super CommandMessage<?>> handler, CommandCallback<? super C, ? super R> callback) Performs the actual handling logic.AsynchronousCommandBus.Builder.messageMonitor(MessageMonitor<? super CommandMessage<?>> messageMonitor) SimpleCommandBus.Builder.messageMonitor(MessageMonitor<? super CommandMessage<?>> messageMonitor) Sets theMessageMonitorof generic typeCommandMessageused the to monitor the command bus.SimpleCommandBus.registerDispatchInterceptor(MessageDispatchInterceptor<? super CommandMessage<?>> dispatchInterceptor) Registers the given list of dispatch interceptors to the command bus.SimpleCommandBus.registerHandlerInterceptor(MessageHandlerInterceptor<? super CommandMessage<?>> handlerInterceptor) Registers the given interceptor to the command bus.MessageHandler<? super CommandMessage<?>>DuplicateCommandHandlerResolver.resolve(String commandName, MessageHandler<? super CommandMessage<?>> registeredHandler, MessageHandler<? super CommandMessage<?>> candidateHandler) Chooses what to do when a duplicate handler is registered, returning the handler that should be selected for command handling, or otherwise throwing an exception to reject registration altogether.MessageHandler<? super CommandMessage<?>>FailingDuplicateCommandHandlerResolver.resolve(String commandName, MessageHandler<? super CommandMessage<?>> registeredHandler, MessageHandler<? super CommandMessage<?>> candidateHandler) MessageHandler<? super CommandMessage<?>>LoggingDuplicateCommandHandlerResolver.resolve(String commandName, MessageHandler<? super CommandMessage<?>> registeredHandler, MessageHandler<? super CommandMessage<?>> candidateHandler) CommandBus.subscribe(String commandName, MessageHandler<? super CommandMessage<?>> handler) Subscribe the givenhandlerto commands with the givencommandName.SimpleCommandBus.subscribe(String commandName, MessageHandler<? super CommandMessage<?>> handler) Subscribe the givenhandlerto commands with givencommandName.Constructors in org.axonframework.commandhandling with parameters of type CommandMessageModifierConstructorDescriptionNoHandlerForCommandException(CommandMessage<?> commandMessage) Initialize this exception with a message describing the givenCommandMessage.Constructor parameters in org.axonframework.commandhandling with type arguments of type CommandMessageModifierConstructorDescriptionDuplicateCommandHandlerSubscriptionException(String commandName, MessageHandler<? super CommandMessage<?>> initialHandler, MessageHandler<? super CommandMessage<?>> duplicateHandler) Initialize a duplicate command handler subscription exception using the giveninitialHandlerandduplicateHandlerto form a specific message. -
Uses of CommandMessage in org.axonframework.commandhandling.callbacks
Methods in org.axonframework.commandhandling.callbacks with parameters of type CommandMessageModifier and TypeMethodDescriptionvoidFailureLoggingCallback.onResult(CommandMessage<? extends C> commandMessage, CommandResultMessage<? extends R> commandResultMessage) voidFutureCallback.onResult(CommandMessage<? extends C> commandMessage, CommandResultMessage<? extends R> commandResultMessage) voidLoggingCallback.onResult(CommandMessage message, CommandResultMessage commandResultMessage) voidNoOpCallback.onResult(CommandMessage<?> commandMessage, CommandResultMessage<?> commandResultMessage) Invoked when command handling execution is completed. -
Uses of CommandMessage in org.axonframework.commandhandling.distributed
Methods in org.axonframework.commandhandling.distributed that return CommandMessageModifier and TypeMethodDescriptionDispatchMessage.getCommandMessage(Serializer serializer) Returns the CommandMessage wrapped in this Message.CommandCallbackWrapper.getMessage()Returns the command message that was sent.Methods in org.axonframework.commandhandling.distributed with parameters of type CommandMessageModifier and TypeMethodDescription<C> voidDistributedCommandBus.dispatch(CommandMessage<C> command) <C,R> void DistributedCommandBus.dispatch(CommandMessage<C> command, CommandCallback<? super C, ? super R> callback) Dispatch the givencommandto the CommandHandler subscribed to the givencommand's name.protected abstract StringAbstractRoutingStrategy.doResolveRoutingKey(CommandMessage<?> command) Resolve the Routing Key for the givencommand.protected StringAnnotationRoutingStrategy.doResolveRoutingKey(CommandMessage<?> command) protected StringMetaDataRoutingStrategy.doResolveRoutingKey(CommandMessage<?> command) CommandRouter.findDestination(CommandMessage<?> message) Returns the member instance to which the givenmessageshould be routed.ConsistentHash.getMember(String routingKey, CommandMessage<?> commandMessage) Returns the member instance to which the givenmessageshould be routed.AbstractRoutingStrategy.getRoutingKey(CommandMessage<?> command) RoutingStrategy.getRoutingKey(CommandMessage<?> command) Generates a routing key for the givencommand.UnresolvedRoutingKeyPolicy.getRoutingKey(CommandMessage<?> command) booleanCommandMessageFilter.matches(CommandMessage<?> commandMessage) Indicates whether the givencommandMessagematches this filter.voidCommandCallbackWrapper.onResult(CommandMessage<? extends C> message, CommandResultMessage<? extends R> commandResultMessage) <C> voidCommandBusConnector.send(Member destination, CommandMessage<? extends C> command) Sends the givencommandto the node assigned to handle messages with the givenroutingKey.<C,R> void CommandBusConnector.send(Member destination, CommandMessage<C> command, CommandCallback<? super C, R> callback) Sends the givencommandto the node assigned to handle messages with the givenroutingKey.Method parameters in org.axonframework.commandhandling.distributed with type arguments of type CommandMessageModifier and TypeMethodDescriptionDistributedCommandBus.Builder.messageMonitor(MessageMonitor<? super CommandMessage<?>> messageMonitor) Sets theMessageMonitorfor generic types implementingCommandMessage, which is used to monitor incoming messages and their execution result.DistributedCommandBus.registerDispatchInterceptor(MessageDispatchInterceptor<? super CommandMessage<?>> dispatchInterceptor) Registers the given list of dispatch interceptors to the command bus.DistributedCommandBus.registerHandlerInterceptor(MessageHandlerInterceptor<? super CommandMessage<?>> handlerInterceptor) CommandBusConnector.subscribe(String commandName, MessageHandler<? super CommandMessage<?>> handler) Subscribes a command message handler for commands with givencommandName.DistributedCommandBus.subscribe(String commandName, MessageHandler<? super CommandMessage<?>> handler) Subscribe the givenhandlerto commands with the givencommandName.Constructors in org.axonframework.commandhandling.distributed with parameters of type CommandMessageModifierConstructorDescriptionCommandCallbackWrapper(A channelId, CommandMessage<C> message, CommandCallback<? super C, ? super R> callback) Initializes aCommandCallbackWrapperwhich wraps the original callback and holds on to the commandmessageandchannelIdof the channel on which the message is sent.protectedDispatchMessage(CommandMessage<?> commandMessage, Serializer serializer, boolean expectReply) Initialized a DispatchMessage for the givencommandMessage, which uses the givenserializerto deserialize its contents. -
Uses of CommandMessage in org.axonframework.commandhandling.distributed.commandfilter
Methods in org.axonframework.commandhandling.distributed.commandfilter with parameters of type CommandMessageModifier and TypeMethodDescriptionbooleanAcceptAll.matches(CommandMessage<?> message) booleanAndCommandMessageFilter.matches(CommandMessage<?> commandMessage) booleanCommandNameFilter.matches(CommandMessage<?> commandMessage) booleanDenyAll.matches(CommandMessage<?> message) booleanDenyCommandNameFilter.matches(CommandMessage<?> commandMessage) booleanNegateCommandMessageFilter.matches(CommandMessage<?> commandMessage) booleanOrCommandMessageFilter.matches(CommandMessage<?> commandMessage) -
Uses of CommandMessage in org.axonframework.commandhandling.gateway
Methods in org.axonframework.commandhandling.gateway that return CommandMessageModifier and TypeMethodDescriptionprotected <C> CommandMessage<? extends C>AbstractCommandGateway.processInterceptors(CommandMessage<C> commandMessage) Invokes all the dispatch interceptors and returns the CommandMessage instance that should be dispatched.Methods in org.axonframework.commandhandling.gateway with parameters of type CommandMessageModifier and TypeMethodDescriptionprotected abstract longAbstractRetryScheduler.computeRetryInterval(CommandMessage commandMessage, RuntimeException lastFailure, List<Class<? extends Throwable>[]> failures) Compute the amount of milliseconds delay until the next retry, given the information passed.protected longExponentialBackOffIntervalRetryScheduler.computeRetryInterval(CommandMessage commandMessage, RuntimeException lastFailure, List<Class<? extends Throwable>[]> failures) protected longIntervalRetryScheduler.computeRetryInterval(CommandMessage commandMessage, RuntimeException lastFailure, List<Class<? extends Throwable>[]> failures) voidRetryingCallback.onResult(CommandMessage<? extends C> commandMessage, CommandResultMessage<? extends R> commandResultMessage) protected <C> CommandMessage<? extends C>AbstractCommandGateway.processInterceptors(CommandMessage<C> commandMessage) Invokes all the dispatch interceptors and returns the CommandMessage instance that should be dispatched.booleanAbstractRetryScheduler.scheduleRetry(CommandMessage commandMessage, RuntimeException lastFailure, List<Class<? extends Throwable>[]> failures, Runnable dispatchTask) This is the entrypoint of theRetryScheduler.booleanRetryScheduler.scheduleRetry(CommandMessage commandMessage, RuntimeException lastFailure, List<Class<? extends Throwable>[]> failures, Runnable commandDispatch) Inspect the givencommandMessagethat failed with givenlastFailure.Method parameters in org.axonframework.commandhandling.gateway with type arguments of type CommandMessageModifier and TypeMethodDescriptionAbstractCommandGateway.Builder.dispatchInterceptors(List<MessageDispatchInterceptor<? super CommandMessage<?>>> dispatchInterceptors) CommandGatewayFactory.Builder.dispatchInterceptors(List<MessageDispatchInterceptor<? super CommandMessage<?>>> dispatchInterceptors) Sets theMessageDispatchInterceptors which are invoked before dispatching aCommandMessageon theCommandBus.DefaultCommandGateway.Builder.dispatchInterceptors(List<MessageDispatchInterceptor<? super CommandMessage<?>>> dispatchInterceptors) protected RegistrationAbstractCommandGateway.registerDispatchInterceptor(MessageDispatchInterceptor<? super CommandMessage<?>> interceptor) Registers a command dispatch interceptor within aCommandGateway.CommandGatewayFactory.registerDispatchInterceptor(MessageDispatchInterceptor<CommandMessage<?>> dispatchInterceptor) Registers the givendispatchInterceptorwhich is invoked for each Command dispatched through the Command Gateways created by this factory.DefaultCommandGateway.registerDispatchInterceptor(MessageDispatchInterceptor<? super CommandMessage<?>> dispatchInterceptor)