Class WriteableBodyPart.Builder

    • Method Detail

      • entity

        public WriteableBodyPart.Builder entity​(Object entity)
        Create a new body part backed by the specified entity.
        Parameters:
        entity - entity for the body part content
        Returns:
        this builder instance
      • entityStream

        public <T> WriteableBodyPart.Builder entityStream​(Flow.Publisher<T> stream,
                                                          Class<T> type)
        Create a new body part backed by the specified entity stream.
        Type Parameters:
        T - stream item type
        Parameters:
        stream - stream of entities for the body part content
        type - actual representation of the entity type
        Returns:
        this builder instance
      • publisher

        public WriteableBodyPart.Builder publisher​(Flow.Publisher<DataChunk> publisher)
        Create a new body part backed by the specified publisher.
        Parameters:
        publisher - publisher for the part content
        Returns:
        this builder instance