Class HttpProxy.CreateTunnelPromise
java.lang.Object
org.eclipse.jetty.client.HttpProxy.CreateTunnelPromise
- All Implemented Interfaces:
Promise<Connection>
- Enclosing class:
HttpProxy
Creates a tunnel using HTTP CONNECT.
It is implemented as a promise because it needs to establish the tunnel after the TCP connection is succeeded, and needs to notify the nested promise when the tunnel is established (or failed).
-
Nested Class Summary
Nested classes/interfaces inherited from interface Promise
Promise.Adapter<U>, Promise.Completable<S>, Promise.Wrapper<W> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientConnectionFactoryprivate final EndPointprivate final Promise<Connection> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCreateTunnelPromise(ClientConnectionFactory connectionFactory, EndPoint endPoint, Promise<Connection> promise, Map<String, Object> context) -
Method Summary
Modifier and TypeMethodDescriptionvoidCallback invoked when the operation fails.voidsucceeded(Connection connection) Callback invoked when the operation completes.private voidtunnel(HttpDestination destination, Connection connection) private voidtunnelFailed(EndPoint endPoint, Throwable failure) private voidtunnelSucceeded(EndPoint endPoint)
-
Field Details
-
connectionFactory
-
endPoint
-
promise
-
context
-
-
Constructor Details
-
CreateTunnelPromise
private CreateTunnelPromise(ClientConnectionFactory connectionFactory, EndPoint endPoint, Promise<Connection> promise, Map<String, Object> context)
-
-
Method Details
-
succeeded
Description copied from interface:PromiseCallback invoked when the operation completes.
- Specified by:
succeededin interfacePromise<Connection>- Parameters:
connection- the context- See Also:
-
failed
Description copied from interface:PromiseCallback invoked when the operation fails.
- Specified by:
failedin interfacePromise<Connection>- Parameters:
x- the reason for the operation failure
-
tunnel
-
tunnelSucceeded
-
tunnelFailed
-