Interface ResetContext

All Superinterfaces:
Message
All Known Implementing Classes:
GenericResetContext

public interface ResetContext extends Message
A Message initiating the reset of an Event Handling Component.

A payload can be provided to support the reset operation handling this message.

Since:
4.4.0
Author:
Steven van Beelen
  • Method Details

    • withMetadata

      @Nonnull ResetContext withMetadata(@Nonnull Map<String,String> metadata)
      Description copied from interface: Message
      Returns a copy of this Message (implementation) with the given metadata.

      All other fields, like for example the Message.payload(), remain unchanged.

      While the implementation returned may be different from the implementation of this, implementations must take special care in returning the same type of Message to prevent errors further downstream.

      Specified by:
      withMetadata in interface Message
      Parameters:
      metadata - The new metadata for the Message.
      Returns:
      A copy of this Message (implementation) with the given metadata.
    • andMetadata

      @Nonnull ResetContext andMetadata(@Nonnull Map<String,String> metadata)
      Description copied from interface: Message
      Returns a copy of this Message (implementation) with its metadata merged with the given metadata.

      All other fields, like for example the Message.payload(), remain unchanged.

      Specified by:
      andMetadata in interface Message
      Parameters:
      metadata - The metadata to merge with.
      Returns:
      A copy of this Message (implementation) with the given metadata.
    • withConvertedPayload

      @Nonnull default ResetContext withConvertedPayload(@Nonnull Class<?> type, @Nonnull Converter converter)
      Description copied from interface: Message
      Returns a new Message implementation with its Message.payload() converted to the given type by the given converter. This new Message is effectively a copy of this Message with a renewed payload and Message.payloadType().

      Will return the this instance if the payload type is assignable from the converted result.

      Specified by:
      withConvertedPayload in interface Message
      Parameters:
      type - The type to convert the Message.payload() to.
      converter - The converter to convert the Message.payload() with.
      Returns:
      A new Message implementation with its Message.payload() converted to the given type by the given converter.
    • withConvertedPayload

      @Nonnull default ResetContext withConvertedPayload(@Nonnull TypeReference<?> type, @Nonnull Converter converter)
      Description copied from interface: Message
      Returns a new Message implementation with its Message.payload() converted to the given type by the given converter. This new Message is effectively a copy of this Message with a renewed payload and Message.payloadType().

      Will return the this instance if the payload type is assignable from the converted result.

      Specified by:
      withConvertedPayload in interface Message
      Parameters:
      type - The type to convert the Message.payload() to.
      converter - The converter to convert the Message.payload() with.
      Returns:
      A new Message implementation with its Message.payload() converted to the given type by the given converter.
    • withConvertedPayload

      @Nonnull ResetContext withConvertedPayload(@Nonnull Type type, @Nonnull Converter converter)
      Description copied from interface: Message
      Returns a new Message implementation with its Message.payload() converted to the given type by the given converter. This new Message is effectively a copy of this Message with a renewed payload and Message.payloadType().

      Will return the this instance if the payload type is assignable from the converted result.

      Specified by:
      withConvertedPayload in interface Message
      Parameters:
      type - The type to convert the Message.payload() to.
      converter - The converter to convert the Message.payload() with.
      Returns:
      A new Message implementation with its Message.payload() converted to the given type by the given converter.