
org.webpieces.webserver.test.http2.directfast.MockHttpServer 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 java.nio.ByteBuffer;
import java.util.concurrent.CompletableFuture;
import org.webpieces.frontend2.api.HttpServer;
import org.webpieces.frontend2.api.HttpSvrConfig;
import org.webpieces.nio.api.channels.TCPServerChannel;
import org.webpieces.webserver.test.MockServerChannel;
public class MockHttpServer implements HttpServer {
private HttpSvrConfig config;
public MockHttpServer(HttpSvrConfig config) {
this.config = config;
}
@Override
public CompletableFuture start() {
return CompletableFuture.completedFuture(null);
}
@Override
public CompletableFuture close() {
// TODO Auto-generated method stub
return null;
}
@Override
public void enableOverloadMode(ByteBuffer overloadResponse) {
}
@Override
public void disableOverloadMode() {
}
@Override
public TCPServerChannel getUnderlyingChannel() {
return new MockServerChannel(config);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy