Class LocalCommandBus
java.lang.Object
dk.cloudcreate.essentials.reactive.command.AbstractCommandBus
dk.cloudcreate.essentials.reactive.command.LocalCommandBus
- All Implemented Interfaces:
CommandBus
Provides a JVM local and non-durable,
in regard to
sendAndDontWait(Object)/sendAndDontWait(Object, Duration)),
variant of the CommandBus concept- See Also:
-
Field Summary
Fields inherited from class dk.cloudcreate.essentials.reactive.command.AbstractCommandBus
commandHandlers, commandTypeToCommandHandlerCache, interceptors, sendAndDontWaitErrorHandler -
Constructor Summary
ConstructorsConstructorDescriptionLocalCommandBus(CommandBusInterceptor... interceptors) LocalCommandBus(SendAndDontWaitErrorHandler sendAndDontWaitErrorHandler) LocalCommandBus(SendAndDontWaitErrorHandler sendAndDontWaitErrorHandler, CommandBusInterceptor... interceptors) LocalCommandBus(SendAndDontWaitErrorHandler sendAndDontWaitErrorHandler, List<CommandBusInterceptor> interceptors) LocalCommandBus(List<CommandBusInterceptor> interceptors) -
Method Summary
Modifier and TypeMethodDescription<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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface dk.cloudcreate.essentials.reactive.command.CommandBus
addInterceptors
-
Constructor Details
-
LocalCommandBus
public LocalCommandBus() -
LocalCommandBus
-
LocalCommandBus
-
LocalCommandBus
public LocalCommandBus(SendAndDontWaitErrorHandler sendAndDontWaitErrorHandler, List<CommandBusInterceptor> interceptors) -
LocalCommandBus
-
LocalCommandBus
public LocalCommandBus(SendAndDontWaitErrorHandler sendAndDontWaitErrorHandler, CommandBusInterceptor... interceptors)
-
-
Method Details
-
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
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
-