
org.webpieces.webserver.test.http2.directfast.ProxyRequestStreamHandle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-webserver-test Show documentation
Show all versions of http-webserver-test Show documentation
The full webpieces server AS A library
The newest version!
package org.webpieces.webserver.test.http2.directfast;
import org.webpieces.frontend2.api.HttpStream;
import com.webpieces.http2.api.dto.highlevel.Http2Request;
import com.webpieces.http2.api.streaming.RequestStreamHandle;
import com.webpieces.http2.api.streaming.ResponseStreamHandle;
import com.webpieces.http2.api.streaming.StreamRef;
public class ProxyRequestStreamHandle implements RequestStreamHandle {
private HttpStream stream;
private MockFrontendSocket frontendSocket;
public ProxyRequestStreamHandle(HttpStream stream, MockFrontendSocket frontendSocket) {
this.stream = stream;
this.frontendSocket = frontendSocket;
}
@Override
public StreamRef process(Http2Request request, ResponseStreamHandle responseListener) {
ProxyResponseStream proxyResponse = new ProxyResponseStream(responseListener, frontendSocket);
return stream.incomingRequest(request, proxyResponse);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy