APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.net.http

pack-priv final Class PlainTunnelingConnection

extends HttpConnection
Class Inheritance
Imports
java.io.IOException, java.net.InetSocketAddress, java.net.http.HttpTimeoutException, java.nio.ByteBuffer, java.nio.channels.SocketChannel, java.util.concurrent.CompletableFuture, .CompletionException, java.util.function.Function, jdk.internal.net.http.common.FlowTube, .MinimalFuture

A plain text socket tunnel through a proxy. Uses "CONNECT" but does not encrypt. Used by WebSocket, as well as HTTP over SSL + Proxy. Wrapped in SSLTunnelConnection or AsyncSSLTunnelConnection for encryption.

Field Summary

Modifier and TypeField and Description
private volatile boolean
pack-priv final PlainHttpConnection
pack-priv final InetSocketAddress
pack-priv final Utils.ProxyHeaders
Inherited from jdk.internal.net.http.HttpConnection:
addressCOMPARE_BY_IDdbgTagdebugDEBUG_LOGGER

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
pack-priv ConnectionPool.CacheKey
pack-priv SocketChannel
public void
close()

Implements abstract jdk.internal.net.http.HttpConnection.close.

Implements java.io.Closeable.close.

Closes this connection.

pack-priv void
close(Throwable cause)

Implements abstract jdk.internal.net.http.HttpConnection.close.

Closes this connection due to the given cause.

public CompletableFuture<Void>
connectAsync(Exchange<?> exchange)

Implements abstract jdk.internal.net.http.HttpConnection.connectAsync.

Initiates the connect phase.

pack-priv boolean
connected()

Implements abstract jdk.internal.net.http.HttpConnection.connected.

Tells whether, or not, this connection is connected to its destination.

public CompletableFuture<Void>
finishConnect()

Implements abstract jdk.internal.net.http.HttpConnection.finishConnect.

Finishes the connection phase.

pack-priv FlowTube
getConnectionFlow()

Implements abstract jdk.internal.net.http.HttpConnection.getConnectionFlow.

Returns the underlying connection flow, if applicable.

pack-priv boolean
isProxied()

Implements abstract jdk.internal.net.http.HttpConnection.isProxied.

Tells whether, or not, this connection is proxied.

pack-priv boolean
isSecure()

Implements abstract jdk.internal.net.http.HttpConnection.isSecure.

Tells whether, or not, this connection is secure ( over SSL )

pack-priv boolean
pack-priv InetSocketAddress
proxy()

Implements abstract jdk.internal.net.http.HttpConnection.proxy.

Returns the address of the proxy used by this connection.

pack-priv HttpConnection.HttpPublisher
publisher()

Implements abstract jdk.internal.net.http.HttpConnection.publisher.

Returns the HTTP publisher associated with this connection.

Inherited from jdk.internal.net.http.HttpConnection:
addressaddTrailingOperationcheckOpenclientcloseOrReturnToCachecontextRestricteddbgStringgetConnectiongetOriginServergetSNIServerNamesheaderFilterisFlowFinishedisOpenlabelnewConnectionIdtoString

Field Detail

connectedback to summary
private volatile boolean connected
delegateback to summary
pack-priv final PlainHttpConnection delegate
proxyAddrback to summary
pack-priv final InetSocketAddress proxyAddr
proxyHeadersback to summary
pack-priv final Utils.ProxyHeaders proxyHeaders

Constructor Detail

PlainTunnelingConnectionback to summary
protected PlainTunnelingConnection(Origin originServer, InetSocketAddress addr, InetSocketAddress proxy, HttpClientImpl client, Utils.ProxyHeaders proxyHeaders, String label)

Method Detail

cacheKeyback to summary
pack-priv ConnectionPool.CacheKey cacheKey()

Implements abstract jdk.internal.net.http.HttpConnection.cacheKey.

Annotations
@Override
channelback to summary
pack-priv SocketChannel channel()

Implements abstract jdk.internal.net.http.HttpConnection.channel.

Annotations
@Override
closeback to summary
public void close()

Implements abstract jdk.internal.net.http.HttpConnection.close.

Implements java.io.Closeable.close.

Doc from jdk.internal.net.http.HttpConnection.close.

Closes this connection.

Annotations
@Override
closeback to summary
pack-priv void close(Throwable cause)

Implements abstract jdk.internal.net.http.HttpConnection.close.

Doc from jdk.internal.net.http.HttpConnection.close.

Closes this connection due to the given cause.

Annotations
@Override
connectAsyncback to summary
public CompletableFuture<Void> connectAsync(Exchange<?> exchange)

Implements abstract jdk.internal.net.http.HttpConnection.connectAsync.

Doc from jdk.internal.net.http.HttpConnection.connectAsync.

Initiates the connect phase. Returns a CompletableFuture that completes when the underlying TCP connection has been established or an error occurs.

Annotations
@Override
connectedback to summary
pack-priv boolean connected()

Implements abstract jdk.internal.net.http.HttpConnection.connected.

Doc from jdk.internal.net.http.HttpConnection.connected.

Tells whether, or not, this connection is connected to its destination.

Annotations
@Override
finishConnectback to summary
public CompletableFuture<Void> finishConnect()

Implements abstract jdk.internal.net.http.HttpConnection.finishConnect.

Doc from jdk.internal.net.http.HttpConnection.finishConnect.

Finishes the connection phase. Returns a CompletableFuture that completes when any additional, type specific, setup has been done. Must be called after connectAsync.

getConnectionFlowback to summary
pack-priv FlowTube getConnectionFlow()

Implements abstract jdk.internal.net.http.HttpConnection.getConnectionFlow.

Doc from jdk.internal.net.http.HttpConnection.getConnectionFlow.

Returns the underlying connection flow, if applicable.

Annotations
@Override
isProxiedback to summary
pack-priv boolean isProxied()

Implements abstract jdk.internal.net.http.HttpConnection.isProxied.

Doc from jdk.internal.net.http.HttpConnection.isProxied.

Tells whether, or not, this connection is proxied. Returns true for tunnel connections, or clear connection to any host through proxy.

Annotations
@Override
isSecureback to summary
pack-priv boolean isSecure()

Implements abstract jdk.internal.net.http.HttpConnection.isSecure.

Doc from jdk.internal.net.http.HttpConnection.isSecure.

Tells whether, or not, this connection is secure ( over SSL )

Annotations
@Override
isTunnelback to summary
pack-priv boolean isTunnel()

Overrides jdk.internal.net.http.HttpConnection.isTunnel.

Annotations
@Override
proxyback to summary
pack-priv InetSocketAddress proxy()

Implements abstract jdk.internal.net.http.HttpConnection.proxy.

Doc from jdk.internal.net.http.HttpConnection.proxy.

Returns the address of the proxy used by this connection. Returns the proxy address for tunnel connections, or clear connection to any host through proxy. Returns null otherwise.

Annotations
@Override
publisherback to summary
pack-priv HttpConnection.HttpPublisher publisher()

Implements abstract jdk.internal.net.http.HttpConnection.publisher.

Doc from jdk.internal.net.http.HttpConnection.publisher.

Returns the HTTP publisher associated with this connection. May be null if invoked before connecting.

Annotations
@Override