| Modifier and Type | Class and Description |
|---|---|
| private static class | HttpProxy.CreateTunnelPromise
Creates a tunnel using HTTP CONNECT. |
| private class | |
| private static class | |
| private static class |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public URI | |
| private boolean | |
| public ClientConnectionFactory | newClientConnectionFactory(ClientConnectionFactory
the nested connectionFactory)ClientConnectionFactoryImplements abstract org. |
| private boolean | |
| public boolean |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| HttpProxy | back to summary |
|---|---|
| public HttpProxy(String host, int port) | |
| HttpProxy | back to summary |
|---|---|
| public HttpProxy(Origin. | |
| HttpProxy | back to summary |
|---|---|
| public HttpProxy(Origin. | |
| HttpProxy | back to summary |
|---|---|
| public HttpProxy(Origin. | |
| HttpProxy | back to summary |
|---|---|
| public HttpProxy(Origin. | |
| HttpProxy | back to summary |
|---|---|
| private HttpProxy(Origin. | |
| getURI | back to summary |
|---|---|
| public URI getURI() Overrides org.
| |
| isHTTP2 | back to summary |
|---|---|
| private boolean isHTTP2(String protocol) | |
| newClientConnectionFactory | back to summary |
|---|---|
| public ClientConnectionFactory newClientConnectionFactory(ClientConnectionFactory connectionFactory) Implements abstract org.
| |
| protocolMatches | back to summary |
|---|---|
| private boolean protocolMatches(String protocol, List<String> protocols) | |
| requiresTunnel | back to summary |
|---|---|
| public boolean requiresTunnel(Origin serverOrigin) | |
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).
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final ClientConnectionFactory | |
| private final Map | |
| private final HttpDestination | |
| private final EndPoint | |
| private final Promise |
| Access | Constructor and Description |
|---|---|
| private | CreateTunnelPromise(ClientConnectionFactory connectionFactory, EndPoint endPoint, HttpDestination destination, Promise<Connection> promise, Map<String, Object> context)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | failed(Throwable
the reason for the operation failure x)Overrides default org. Callback invoked when the operation fails. |
| public void | succeeded(Connection
the context connection)Overrides default org. Callback invoked when the operation completes. |
| private void | |
| private void | |
| private void |
| connectionFactory | back to summary |
|---|---|
| private final ClientConnectionFactory connectionFactory | |
| context | back to summary |
|---|---|
| private final Map<String, Object> context | |
| destination | back to summary |
|---|---|
| private final HttpDestination destination | |
| endPoint | back to summary |
|---|---|
| private final EndPoint endPoint | |
| promise | back to summary |
|---|---|
| private final Promise<Connection> promise | |
| CreateTunnelPromise | back to summary |
|---|---|
| private CreateTunnelPromise(ClientConnectionFactory connectionFactory, EndPoint endPoint, HttpDestination destination, Promise<Connection> promise, Map<String, Object> context) | |
| failed | back to summary |
|---|---|
| public void failed(Throwable x) Overrides default org. Doc from org. Callback invoked when the operation fails. | |
| succeeded | back to summary |
|---|---|
| public void succeeded(Connection connection) Overrides default org. Doc from org. Callback invoked when the operation completes.
| |
| tunnel | back to summary |
|---|---|
| private void tunnel(Connection connection) | |
| tunnelFailed | back to summary |
|---|---|
| private void tunnelFailed(EndPoint endPoint, Throwable failure) | |
| tunnelSucceeded | back to summary |
|---|---|
| private void tunnelSucceeded(EndPoint endPoint) | |
| Modifier and Type | Field and Description |
|---|---|
| private final HttpConversation |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | onComplete(Result
the result of the request / response exchange result)Overrides default org. |
| public void | onHeaders(Response
the response containing the response line data and the headers response)Overrides default org. |
| conversation | back to summary |
|---|---|
| private final HttpConversation conversation | |
| TunnelListener | back to summary |
|---|---|
| private TunnelListener(Request request) | |
| onComplete | back to summary |
|---|---|
| public void onComplete(Result result) Overrides default org. Doc from org. Callback method invoked when the request and the response have been processed, either successfully or not.
The
Requests may complete after response, for example in case of big uploads that are
discarded or read asynchronously by the server.
This method is always invoked after | |
| onHeaders | back to summary |
|---|---|
| public void onHeaders(Response response) Overrides default org. Doc from org. Callback method invoked when all the response headers have been received and parsed. | |
| Modifier and Type | Field and Description |
|---|---|
| private final ClientConnectionFactory |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Connection | newConnection(EndPoint
the endPoint, Map<String, Object> org. to link the newly created connection tothe context data to create the connection context)Implements org. |
| private Connection |
| connectionFactory | back to summary |
|---|---|
| private final ClientConnectionFactory connectionFactory | |
| HttpProxyClientConnectionFactory | back to summary |
|---|---|
| private HttpProxyClientConnectionFactory(ClientConnectionFactory connectionFactory) | |
| newConnection | back to summary |
|---|---|
| public Connection newConnection(EndPoint endPoint, Map<String, Object> context) throws IOException Implements org.
| |
| newProxyConnection | back to summary |
|---|---|
| private Connection newProxyConnection(EndPoint endPoint, Map<String, Object> context) throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| private Object | |
| private final Connection | |
| private final Destination | |
| private final Promise |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements org. |
| public Object | |
| public SocketAddress | |
| public SocketAddress | getRemoteSocketAddress()
Overrides default org. |
| public boolean | |
| public void | send(Request
the request to send request, Response.the response listener listenerImplements org. |
| public void | setAttachment(Object
the object to attach to this instance obj)Implements org. |
| attachment | back to summary |
|---|---|
| private Object attachment | |
| connection | back to summary |
|---|---|
| private final Connection connection | |
| destination | back to summary |
|---|---|
| private final Destination destination | |
| promise | back to summary |
|---|---|
| private final Promise<Connection> promise | |
| ProxyConnection | back to summary |
|---|---|
| private ProxyConnection(Destination destination, Connection connection, Promise<Connection> promise) | |
| close | back to summary |
|---|---|
| public void close() Implements org. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| getAttachment | back to summary |
|---|---|
| public Object getAttachment() Implements org.
| |
| getLocalSocketAddress | back to summary |
|---|---|
| public SocketAddress getLocalSocketAddress() Overrides default org.
| |
| getRemoteSocketAddress | back to summary |
|---|---|
| public SocketAddress getRemoteSocketAddress() Overrides default org.
| |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Implements org.
| |
| send | back to summary |
|---|---|
| public void send(Request request, Response. Implements org. Doc from org. Sends a request with an associated response listener.
| |
| setAttachment | back to summary |
|---|---|
| public void setAttachment(Object obj) Implements org. Doc from org. Attaches the given object to this stream for later retrieval. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Response. | |
| private final Promise | |
| private final Request |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | failed(Throwable
the reason for the operation failure x)Overrides default org. Callback invoked when the operation fails. |
| public void | succeeded(Connection
the context connection)Overrides default org. Callback invoked when the operation completes. |
| listener | back to summary |
|---|---|
| private final Response. | |
| promise | back to summary |
|---|---|
| private final Promise<Connection> promise | |
| request | back to summary |
|---|---|
| private final Request request | |
| TunnelPromise | back to summary |
|---|---|
| private TunnelPromise(Request request, Response. | |
| failed | back to summary |
|---|---|
| public void failed(Throwable x) Overrides default org. Doc from org. Callback invoked when the operation fails. | |
| succeeded | back to summary |
|---|---|
| public void succeeded(Connection connection) Overrides default org. Doc from org. Callback invoked when the operation completes.
| |