org.jboss.resteasy.reactive.client.impl.ClientRestResponseBuilderImpl Maven / Gradle / Ivy
package org.jboss.resteasy.reactive.client.impl;
import java.io.InputStream;
import java.net.URI;
import org.jboss.resteasy.reactive.RestResponse;
import org.jboss.resteasy.reactive.common.NotImplementedYet;
import org.jboss.resteasy.reactive.common.jaxrs.AbstractRestResponseBuilder;
import org.jboss.resteasy.reactive.common.jaxrs.RestResponseImpl;
public class ClientRestResponseBuilderImpl extends AbstractRestResponseBuilder { //TODO: should not extend the server version
InputStream entityStream;
RestClientRequestContext restClientRequestContext;
public ClientRestResponseBuilderImpl invocationState(RestClientRequestContext restClientRequestContext) {
this.restClientRequestContext = restClientRequestContext;
return this;
}
public ClientRestResponseBuilderImpl entityStream(InputStream entityStream) {
this.entityStream = entityStream;
return this;
}
@Override
protected AbstractRestResponseBuilder doClone() {
return new ClientRestResponseBuilderImpl<>();
}
@Override
public RestResponseImpl build() {
ClientRestResponseImpl response = new ClientRestResponseImpl<>();
populateResponse(response);
response.restClientRequestContext = restClientRequestContext;
response.setEntityStream(entityStream);
return response;
}
@Override
public RestResponse.ResponseBuilder contentLocation(URI location) {
//TODO: needs some thinking
throw new NotImplementedYet();
}
@Override
public RestResponse.ResponseBuilder location(URI location) {
throw new NotImplementedYet();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy