Uses of Interface
dk.cloudcreate.essentials.reactive.command.CommandHandler
-
Packages that use CommandHandler Package Description dk.cloudcreate.essentials.reactive.command dk.cloudcreate.essentials.reactive.command.interceptor -
-
Uses of CommandHandler in dk.cloudcreate.essentials.reactive.command
Classes in dk.cloudcreate.essentials.reactive.command that implement CommandHandler Modifier and Type Class Description classAnnotatedCommandHandlerExtending 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 theEventHandlerannotation.
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 CommandHandler Modifier and Type Field Description protected Set<CommandHandler>AbstractCommandBus. commandHandlersprotected ConcurrentMap<Class<?>,CommandHandler>AbstractCommandBus. commandTypeToCommandHandlerCacheKey: Concrete Command type
Value:CommandHandlerthat can handle the command typeMethods in dk.cloudcreate.essentials.reactive.command that return CommandHandler Modifier and Type Method Description CommandHandlerAbstractCommandBus. findCommandHandlerCapableOfHandling(Object command)CommandHandlerCommandBus. findCommandHandlerCapableOfHandling(Object command)Find aCommandHandlercapable of handling the given commandMethods in dk.cloudcreate.essentials.reactive.command with parameters of type CommandHandler Modifier and Type Method Description CommandBusAbstractCommandBus. addCommandHandler(CommandHandler commandHandler)CommandBusCommandBus. addCommandHandler(CommandHandler commandHandler)Add a new command handler.voidSendAndDontWaitErrorHandler.FallbackSendAndDontWaitErrorHandler. handleError(Exception exception, Object command, CommandHandler commandHandler)voidSendAndDontWaitErrorHandler. handleError(Exception exception, Object command, CommandHandler commandHandler)Handle an exception that occurred duringCommandBus.sendAndDontWait(Object)/CommandBus.sendAndDontWait(Object, Duration)voidSendAndDontWaitErrorHandler.RethrowingSendAndDontWaitErrorHandler. handleError(Exception exception, Object command, CommandHandler commandHandler)booleanAbstractCommandBus. hasCommandHandler(CommandHandler commandHandler)booleanCommandBus. hasCommandHandler(CommandHandler commandHandler)Guard method to test if theCommandBusalready contains the commandHandlerCommandBusAbstractCommandBus. removeCommandHandler(CommandHandler commandHandler)CommandBusCommandBus. 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 CommandHandler Modifier and Type Method Description CommandHandlerCommandBusInterceptorChain.DefaultCommandBusInterceptorChain. matchedCommandHandler()CommandHandlerCommandBusInterceptorChain. matchedCommandHandler()The singleCommandHandlerthe responded true tocanHandle(Class)Methods in dk.cloudcreate.essentials.reactive.command.interceptor with parameters of type CommandHandler Modifier and Type Method Description static 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 CommandHandler Constructor Description DefaultCommandBusInterceptorChain(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
-