Uses of Interface
dk.cloudcreate.essentials.reactive.command.CommandHandler
Packages that use CommandHandler
Package
Description
-
Uses of CommandHandler in dk.cloudcreate.essentials.reactive.command
Classes in dk.cloudcreate.essentials.reactive.command that implement CommandHandlerModifier and TypeClassDescriptionclassExtending this class will allow you to colocate multiple related Command handling methods inside the same class and use it together with theLocalCommandBus
Each method must accept a single Command argument, may return a value or return void and be annotated with either theHandlerorCmdHandlerannotation.
The method argument type is matched against the concrete command type usingClass.isAssignableFrom(Class).
The method accessibility can be any combination of private, protected, public, etc.
Example:Fields in dk.cloudcreate.essentials.reactive.command with type parameters of type CommandHandlerModifier and TypeFieldDescriptionprotected final Set<CommandHandler>AbstractCommandBus.commandHandlersprotected final ConcurrentMap<Class<?>,CommandHandler> AbstractCommandBus.commandTypeToCommandHandlerCacheKey: Concrete Command type
Value:CommandHandlerthat can handle the command typeMethods in dk.cloudcreate.essentials.reactive.command that return CommandHandlerModifier and TypeMethodDescriptionAbstractCommandBus.findCommandHandlerCapableOfHandling(Object command) CommandBus.findCommandHandlerCapableOfHandling(Object command) Find aCommandHandlercapable of handling the given commandMethods in dk.cloudcreate.essentials.reactive.command with parameters of type CommandHandlerModifier and TypeMethodDescriptionAbstractCommandBus.addCommandHandler(CommandHandler commandHandler) CommandBus.addCommandHandler(CommandHandler commandHandler) Add a new command handler.voidSendAndDontWaitErrorHandler.FallbackSendAndDontWaitErrorHandler.handleError(Throwable exception, Object command, CommandHandler commandHandler) voidSendAndDontWaitErrorHandler.handleError(Throwable exception, Object commandMessage, CommandHandler commandHandler) Handle an exception that occurred duringCommandBus.sendAndDontWait(Object)/CommandBus.sendAndDontWait(Object, Duration)voidSendAndDontWaitErrorHandler.RethrowingSendAndDontWaitErrorHandler.handleError(Throwable exception, Object command, CommandHandler commandHandler) booleanAbstractCommandBus.hasCommandHandler(CommandHandler commandHandler) booleanCommandBus.hasCommandHandler(CommandHandler commandHandler) Guard method to test if theCommandBusalready contains the commandHandlerAbstractCommandBus.removeCommandHandler(CommandHandler commandHandler) CommandBus.removeCommandHandler(CommandHandler commandHandler) Remove a command handler. -
Uses of CommandHandler in dk.cloudcreate.essentials.reactive.command.interceptor
Methods in dk.cloudcreate.essentials.reactive.command.interceptor that return CommandHandlerModifier and TypeMethodDescriptionCommandBusInterceptorChain.DefaultCommandBusInterceptorChain.matchedCommandHandler()CommandBusInterceptorChain.matchedCommandHandler()The singleCommandHandlerthe responded true tocanHandle(Class)Methods in dk.cloudcreate.essentials.reactive.command.interceptor with parameters of type CommandHandlerModifier and TypeMethodDescriptionstatic CommandBusInterceptorChainCommandBusInterceptorChain.newInterceptorChain(Object command, CommandHandler matchedCommandHandler, List<CommandBusInterceptor> interceptors, BiFunction<CommandBusInterceptor, CommandBusInterceptorChain, Object> interceptorOperationInvoker, Function<Object, Object> defaultCommandBusBehaviour) Create a newCommandBusInterceptorChaininstance for the handling of a CommandConstructors in dk.cloudcreate.essentials.reactive.command.interceptor with parameters of type CommandHandlerModifierConstructorDescriptionDefaultCommandBusInterceptorChain(Object command, CommandHandler matchedCommandHandler, List<CommandBusInterceptor> interceptors, BiFunction<CommandBusInterceptor, CommandBusInterceptorChain, Object> interceptorOperationInvoker, Function<Object, Object> defaultCommandBusBehaviour) Create a newCommandBusInterceptorChaininstance for the handling of a Command