com.linkedin.r2.message.stream.StreamResponseBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of r2-core Show documentation
Show all versions of r2-core Show documentation
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.BaseResponseBuilder;
import com.linkedin.r2.message.Response;
import com.linkedin.r2.message.stream.entitystream.EntityStream;
/**
* @author Zhenkai Zhu
*/
public final class StreamResponseBuilder extends BaseResponseBuilder
implements StreamMessageBuilder
{
/**
* Constructs a new builder with no initial values.
*/
public StreamResponseBuilder() {}
/**
* Copies the values from the supplied response. Changes to this builder will not be reflected
* in the original message.
*
* @param response the response to copy
*/
public StreamResponseBuilder(Response response)
{
super(response);
}
@Override
public StreamResponse build(EntityStream entityStream)
{
return new StreamResponseImpl(entityStream, getHeaders(), getCookies(), getStatus());
}
@Override
public StreamResponse buildCanonical(EntityStream entityStream)
{
return new StreamResponseImpl(entityStream, getCanonicalHeaders(), getCanonicalCookies(), getStatus());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy