Interface LiveCommandAnswerBuilder.ModifyCommandResponseStep<R extends LiveCommandResponseFactory,​E extends LiveEventFactory>

    • Method Detail

      • withResponse

        LiveCommandAnswerBuilder.EventStep<E> withResponse​(java.util.function.Function<R,​org.eclipse.ditto.base.model.signals.commands.CommandResponse<?>> createResponseFunction)
        Configures the function for creating a CommandResponse for the incoming Command.
        Parameters:
        createResponseFunction - the function used to build the CommandResponse to be returned.
        Returns:
        an EventStep LiveCommandAnswerBuilder in order to configure the Event to emit.
        Throws:
        java.lang.NullPointerException - if createResponseFunction is null.
      • withoutResponse

        LiveCommandAnswerBuilder.EventStep<E> withoutResponse()
        Configures that no CommandResponse is sent for the incoming Command.

        Be careful using this as the sender of the Command might wait for a CommandResponse.

        Returns:
        an EventStep LiveCommandAnswerBuilder in order to configure the Event to emit