All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.linkedin.r2.message.stream.StreamMessageBuilder Maven / Gradle / Ivy

Go to download

Pegasus is a framework for building robust, scalable service architectures using dynamic discovery and simple asychronous type-checked REST + JSON APIs.

The newest version!
package com.linkedin.r2.message.stream;

import com.linkedin.r2.message.MessageHeadersBuilder;
import com.linkedin.r2.message.stream.entitystream.EntityStream;

/**
 * @author Zhenkai Zhu
 */
public interface StreamMessageBuilder> extends MessageHeadersBuilder
{

  /**
   * Constructs an {@link StreamMessage} using the settings configured in this builder and the supplied EntityStream.
   *
   * @param stream the entity stream for this message
   * @return a Stream from the settings in this builder and the supplied EntityStream
   */
  StreamMessage build(EntityStream stream);

  /**
   * Similar to {@link #build}, but the returned Message is in canonical form.
   *
   * @param stream the entity stream for this message
   * @return a Stream from the settings in this builder and the supplied EntityStream
   */
  StreamMessage buildCanonical(EntityStream stream);
}