Class LocalCommandBus
- java.lang.Object
-
- dk.cloudcreate.essentials.reactive.command.AbstractCommandBus
-
- dk.cloudcreate.essentials.reactive.command.LocalCommandBus
-
- All Implemented Interfaces:
CommandBus
public class LocalCommandBus extends AbstractCommandBus
Provides a JVM local and non-durable, in regard tosendAndDontWait(Object)/sendAndDontWait(Object, Duration)), variant of theCommandBusconcept- See Also:
AnnotatedCommandHandler
-
-
Field Summary
-
Fields inherited from class dk.cloudcreate.essentials.reactive.command.AbstractCommandBus
commandHandlers, commandTypeToCommandHandlerCache, interceptors, sendAndDontWaitErrorHandler
-
-
Constructor Summary
Constructors Constructor Description LocalCommandBus()LocalCommandBus(CommandBusInterceptor... interceptors)LocalCommandBus(SendAndDontWaitErrorHandler sendAndDontWaitErrorHandler)LocalCommandBus(SendAndDontWaitErrorHandler sendAndDontWaitErrorHandler, CommandBusInterceptor... interceptors)LocalCommandBus(SendAndDontWaitErrorHandler sendAndDontWaitErrorHandler, List<CommandBusInterceptor> interceptors)LocalCommandBus(List<CommandBusInterceptor> interceptors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <C> voidsendAndDontWait(C command)The send command asynchronously without waiting for the result of processing the Command.
The command handler cannot return any value when invoked using this method.<C> voidsendAndDontWait(C command, Duration delayMessageDelivery)The send command asynchronously without waiting for the result of processing the Command.
The command handler cannot return any value when invoked using this method.-
Methods inherited from class dk.cloudcreate.essentials.reactive.command.AbstractCommandBus
addCommandHandler, addInterceptor, findCommandHandlerCapableOfHandling, getInterceptors, hasCommandHandler, hasInterceptor, removeCommandHandler, removeInterceptor, send, sendAsync, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface dk.cloudcreate.essentials.reactive.command.CommandBus
addInterceptors
-
-
-
-
Constructor Detail
-
LocalCommandBus
public LocalCommandBus()
-
LocalCommandBus
public LocalCommandBus(SendAndDontWaitErrorHandler sendAndDontWaitErrorHandler)
-
LocalCommandBus
public LocalCommandBus(List<CommandBusInterceptor> interceptors)
-
LocalCommandBus
public LocalCommandBus(SendAndDontWaitErrorHandler sendAndDontWaitErrorHandler, List<CommandBusInterceptor> interceptors)
-
LocalCommandBus
public LocalCommandBus(CommandBusInterceptor... interceptors)
-
LocalCommandBus
public LocalCommandBus(SendAndDontWaitErrorHandler sendAndDontWaitErrorHandler, CommandBusInterceptor... interceptors)
-
-
Method Detail
-
sendAndDontWait
public <C> void sendAndDontWait(C command)
Description copied from interface:CommandBusThe send command asynchronously without waiting for the result of processing the Command.
The command handler cannot return any value when invoked using this method.- Type Parameters:
C- the command type- Parameters:
command- the command to send
-
sendAndDontWait
public <C> void sendAndDontWait(C command, Duration delayMessageDelivery)Description copied from interface:CommandBusThe send command asynchronously without waiting for the result of processing the Command.
The command handler cannot return any value when invoked using this method.- Type Parameters:
C- the command type- Parameters:
command- the command to senddelayMessageDelivery- how long should we delay the command message sending
-
-