Class UnitOfWorkControllingCommandBusInterceptor
- java.lang.Object
-
- dk.cloudcreate.essentials.components.foundation.reactive.command.UnitOfWorkControllingCommandBusInterceptor
-
- All Implemented Interfaces:
CommandBusInterceptor
public class UnitOfWorkControllingCommandBusInterceptor extends Object implements CommandBusInterceptor
CommandBusInterceptorthat ensures that each Command is handled within aUnitOfWorkby using theUnitOfWorkFactory.withUnitOfWork(CheckedFunction)
-
-
Constructor Summary
Constructors Constructor Description UnitOfWorkControllingCommandBusInterceptor(UnitOfWorkFactory<? extends UnitOfWork> unitOfWorkFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectinterceptSend(Object command, CommandBusInterceptorChain commandBusInterceptorChain)voidinterceptSendAndDontWait(Object command, CommandBusInterceptorChain commandBusInterceptorChain)ObjectinterceptSendAsync(Object command, CommandBusInterceptorChain commandBusInterceptorChain)
-
-
-
Constructor Detail
-
UnitOfWorkControllingCommandBusInterceptor
public UnitOfWorkControllingCommandBusInterceptor(UnitOfWorkFactory<? extends UnitOfWork> unitOfWorkFactory)
-
-
Method Detail
-
interceptSend
public Object interceptSend(Object command, CommandBusInterceptorChain commandBusInterceptorChain)
- Specified by:
interceptSendin interfaceCommandBusInterceptor
-
interceptSendAsync
public Object interceptSendAsync(Object command, CommandBusInterceptorChain commandBusInterceptorChain)
- Specified by:
interceptSendAsyncin interfaceCommandBusInterceptor
-
interceptSendAndDontWait
public void interceptSendAndDontWait(Object command, CommandBusInterceptorChain commandBusInterceptorChain)
- Specified by:
interceptSendAndDontWaitin interfaceCommandBusInterceptor
-
-