Interface LiveCommandResponseFactory

    • Method Summary

      All Methods Instance Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      default org.eclipse.ditto.signals.commands.things.ThingErrorResponse errorResponse​(String thingId, org.eclipse.ditto.model.base.exceptions.DittoRuntimeException dittoRuntimeException)
      Deprecated.
      Thing ID is now typed.
      default org.eclipse.ditto.signals.commands.things.ThingErrorResponse errorResponse​(org.eclipse.ditto.model.base.exceptions.DittoRuntimeException dittoRuntimeException)
      Creates a generic ErrorResponse which includes the passed DittoRuntimeException.
      default org.eclipse.ditto.signals.commands.things.ThingErrorResponse errorResponse​(org.eclipse.ditto.model.things.ThingId thingId, org.eclipse.ditto.model.base.exceptions.DittoRuntimeException dittoRuntimeException)
      Creates a generic ErrorResponse which includes the passed DittoRuntimeException.
    • Method Detail

      • errorResponse

        default org.eclipse.ditto.signals.commands.things.ThingErrorResponse errorResponse​(org.eclipse.ditto.model.base.exceptions.DittoRuntimeException dittoRuntimeException)
        Creates a generic ErrorResponse which includes the passed DittoRuntimeException.

        Use this method only if you are absolutely sure that the counterpart which issued the Command expects such a type of ErrorResponse for the issued Command.

        Parameters:
        dittoRuntimeException - the DittoRuntimeException to include in the ErrorResponse.
        Returns:
        the built ErrorResponse.
        Throws:
        NullPointerException - if DittoRuntimeException is null.
      • errorResponse

        @Deprecated
        default org.eclipse.ditto.signals.commands.things.ThingErrorResponse errorResponse​(String thingId,
                                                                                           org.eclipse.ditto.model.base.exceptions.DittoRuntimeException dittoRuntimeException)
        Creates a generic ErrorResponse which includes the passed DittoRuntimeException.

        Use this method only if you are absolutely sure that the counterpart which issued the Command expects such a type of ErrorResponse for the issued Command.

        Parameters:
        thingId - the Thing ID of the related Thing.
        dittoRuntimeException - the DittoRuntimeException to include in the ErrorResponse.
        Returns:
        the built ErrorResponse.
        Throws:
        NullPointerException - if dittoRuntimeException is null.
      • errorResponse

        default org.eclipse.ditto.signals.commands.things.ThingErrorResponse errorResponse​(org.eclipse.ditto.model.things.ThingId thingId,
                                                                                           org.eclipse.ditto.model.base.exceptions.DittoRuntimeException dittoRuntimeException)
        Creates a generic ErrorResponse which includes the passed DittoRuntimeException.

        Use this method only if you are absolutely sure that the counterpart which issued the Command expects such a type of ErrorResponse for the issued Command.

        Parameters:
        thingId - the Thing ID of the related Thing.
        dittoRuntimeException - the DittoRuntimeException to include in the ErrorResponse.
        Returns:
        the built ErrorResponse.
        Throws:
        NullPointerException - if dittoRuntimeException is null.