Class ProxyToServerConnection

All Implemented Interfaces:
ChannelHandler, ChannelInboundHandler

@Sharable public class ProxyToServerConnection extends ProxyConnection<HttpResponse>

Represents a connection from our proxy to a server on the web. ProxyConnections are reused fairly liberally, and can go from disconnected to connected, back to disconnected and so on.

Connecting a ProxyToServerConnection can involve more than just connecting the underlying Channel. In particular, the connection may use encryption (i.e. TLS) and it may also establish an HTTP CONNECT tunnel. The various steps involved in fully establishing a connection are encapsulated in the property connectionFlow, which is initialized in initializeConnectionFlow().