Search in sources :

Example 1 with MockTcpChannel

use of org.webpieces.webserver.test.MockTcpChannel in project webpieces by deanhiller.

the class DirectHttp11Client method createHttpSocket.

public HttpSocket createHttpSocket(HttpSocketListener closeListener) {
    ConnectionListener listener = mgr.getHttpConnection();
    MockTcpChannel channel = new MockTcpChannel(false);
    return new HttpSocketImpl(new DelayedProxy(listener, channel), parser, closeListener, false);
// return new Http11SocketImpl(listener, channel, parser, false);
}
Also used : MockTcpChannel(org.webpieces.webserver.test.MockTcpChannel) ConnectionListener(org.webpieces.nio.api.handlers.ConnectionListener) HttpSocketImpl(org.webpieces.httpclient11.impl.HttpSocketImpl)

Example 2 with MockTcpChannel

use of org.webpieces.webserver.test.MockTcpChannel in project webpieces by deanhiller.

the class DirectHttp11Client method createHttpsSocket.

public HttpSocket createHttpsSocket(SSLEngine engine, HttpSocketListener closeListener) {
    ConnectionListener listener = mgr.getHttpsConnection();
    MockTcpChannel channel = new MockTcpChannel(true);
    return new HttpSocketImpl(new DelayedProxy(listener, channel), parser, closeListener, true);
}
Also used : MockTcpChannel(org.webpieces.webserver.test.MockTcpChannel) ConnectionListener(org.webpieces.nio.api.handlers.ConnectionListener) HttpSocketImpl(org.webpieces.httpclient11.impl.HttpSocketImpl)

Example 3 with MockTcpChannel

use of org.webpieces.webserver.test.MockTcpChannel in project webpieces by deanhiller.

the class DirectHttp2Client method createHttpSocket.

public Http2Socket createHttpSocket(Http2SocketListener socketListener) {
    ConnectionListener listener = mgr.getHttpConnection();
    MockTcpChannel channel = new MockTcpChannel(false);
    return new Http2SocketImpl(new DelayedProxy(listener, channel), factory, socketListener);
}
Also used : MockTcpChannel(org.webpieces.webserver.test.MockTcpChannel) ConnectionListener(org.webpieces.nio.api.handlers.ConnectionListener) Http2SocketImpl(org.webpieces.http2client.impl.Http2SocketImpl)

Example 4 with MockTcpChannel

use of org.webpieces.webserver.test.MockTcpChannel in project webpieces by deanhiller.

the class DirectHttp2Client method createHttpsSocket.

public Http2Socket createHttpsSocket(SSLEngine engine, Http2SocketListener socketListener) {
    ConnectionListener listener = mgr.getHttpConnection();
    MockTcpChannel channel = new MockTcpChannel(true);
    return new Http2SocketImpl(new DelayedProxy(listener, channel), factory, socketListener);
}
Also used : MockTcpChannel(org.webpieces.webserver.test.MockTcpChannel) ConnectionListener(org.webpieces.nio.api.handlers.ConnectionListener) Http2SocketImpl(org.webpieces.http2client.impl.Http2SocketImpl)

Aggregations

ConnectionListener (org.webpieces.nio.api.handlers.ConnectionListener)4 MockTcpChannel (org.webpieces.webserver.test.MockTcpChannel)4 Http2SocketImpl (org.webpieces.http2client.impl.Http2SocketImpl)2 HttpSocketImpl (org.webpieces.httpclient11.impl.HttpSocketImpl)2