java.lang.Object
dk.cloudcreate.essentials.components.foundation.reactive.command.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 Details

    • UnitOfWorkControllingCommandBusInterceptor

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

    • 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