Interface EventSourcedEntity.Effect.OnSuccessBuilder<S>

Enclosing interface:
EventSourcedEntity.Effect<T>

public static interface EventSourcedEntity.Effect.OnSuccessBuilder<S>
  • Method Details

    • deleteEntity

      Delete the entity. No addition events are allowed.
    • thenReply

      <T> EventSourcedEntity.Effect<T> thenReply(Function<S,T> replyMessage)
      Reply after for example emitEvent.
      Type Parameters:
      T - The type of the message that must be returned by this call.
      Parameters:
      replyMessage - Function to create the reply message from the new state.
      Returns:
      A message reply.
    • thenReply

      <T> EventSourcedEntity.Effect<T> thenReply(Function<S,T> replyMessage, Metadata metadata)
      Reply after for example emitEvent.
      Type Parameters:
      T - The type of the message that must be returned by this call.
      Parameters:
      replyMessage - Function to create the reply message from the new state.
      metadata - The metadata for the message.
      Returns:
      A message reply.
    • thenForward

      <T> EventSourcedEntity.Effect<T> thenForward(Function<S,DeferredCall<? extends Object,T>> serviceCall)
      Create a forward reply after for example emitEvent.
      Type Parameters:
      T - The type of the message that must be returned by this call.
      Parameters:
      serviceCall - The service call representing the forward.
      Returns:
      A forward reply.
    • thenAddSideEffect

      Attach the given side effect to this reply from the new state.
      Parameters:
      sideEffect - The effect to attach.
      Returns:
      A new reply with the attached effect.