Class UnitOfWorkControllingCommandBusInterceptor

  • All Implemented Interfaces:
    dk.cloudcreate.essentials.reactive.command.interceptor.CommandBusInterceptor

    public class UnitOfWorkControllingCommandBusInterceptor
    extends Object
    implements dk.cloudcreate.essentials.reactive.command.interceptor.CommandBusInterceptor
    CommandBusInterceptor that ensures that each Command is handled within a UnitOfWork by using the UnitOfWorkFactory.withUnitOfWork(CheckedFunction)
    • Constructor Detail

      • UnitOfWorkControllingCommandBusInterceptor

        public UnitOfWorkControllingCommandBusInterceptor​(UnitOfWorkFactory<? extends UnitOfWork> unitOfWorkFactory)
    • Method Detail

      • interceptSend

        public Object interceptSend​(Object command,
                                    dk.cloudcreate.essentials.reactive.command.interceptor.CommandBusInterceptorChain commandBusInterceptorChain)
        Specified by:
        interceptSend in interface dk.cloudcreate.essentials.reactive.command.interceptor.CommandBusInterceptor
      • interceptSendAsync

        public Object interceptSendAsync​(Object command,
                                         dk.cloudcreate.essentials.reactive.command.interceptor.CommandBusInterceptorChain commandBusInterceptorChain)
        Specified by:
        interceptSendAsync in interface dk.cloudcreate.essentials.reactive.command.interceptor.CommandBusInterceptor
      • interceptSendAndDontWait

        public void interceptSendAndDontWait​(Object command,
                                             dk.cloudcreate.essentials.reactive.command.interceptor.CommandBusInterceptorChain commandBusInterceptorChain)
        Specified by:
        interceptSendAndDontWait in interface dk.cloudcreate.essentials.reactive.command.interceptor.CommandBusInterceptor