Package org.eclipse.jetty.client
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 org.eclipse.jetty.util.Promise
Promise.Adapter<U>, Promise.Completable<S>, Promise.Wrapper<W>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientConnectionFactory
private final EndPoint
private final Promise<Connection>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
CreateTunnelPromise
(ClientConnectionFactory connectionFactory, EndPoint endPoint, Promise<Connection> promise, Map<String, Object> context) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Callback invoked when the operation fails.void
succeeded
(Connection connection) Callback invoked when the operation completes.private void
tunnel
(HttpDestination destination, Connection connection) private void
tunnelFailed
(EndPoint endPoint, Throwable failure) private void
tunnelSucceeded
(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:Promise
Callback invoked when the operation completes.
- Specified by:
succeeded
in interfacePromise<Connection>
- Parameters:
connection
- the context- See Also:
-
failed
Description copied from interface:Promise
Callback invoked when the operation fails.
- Specified by:
failed
in interfacePromise<Connection>
- Parameters:
x
- the reason for the operation failure
-
tunnel
-
tunnelSucceeded
-
tunnelFailed
-