Class HttpTunnelConnection
java.lang.Object
org.springframework.boot.devtools.tunnel.client.HttpTunnelConnection
- All Implemented Interfaces:
TunnelConnection
TunnelConnection
implementation that uses HTTP to transfer data.- Since:
- 1.3.0
- Author:
- Phillip Webb, Rob Winch, Andy Wilkinson
- See Also:
-
Nested Class Summary
-
Constructor Summary
ModifierConstructorDescriptionHttpTunnelConnection
(String url, ClientHttpRequestFactory requestFactory) Create a newHttpTunnelConnection
instance.protected
HttpTunnelConnection
(String url, ClientHttpRequestFactory requestFactory, Executor executor) Create a newHttpTunnelConnection
instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected final ClientHttpRequest
createRequest
(boolean hasPayload) open
(WritableByteChannel incomingChannel, Closeable closeable) Open the tunnel connection.
-
Constructor Details
-
HttpTunnelConnection
Create a newHttpTunnelConnection
instance.- Parameters:
url
- the URL to connect torequestFactory
- the HTTP request factory
-
HttpTunnelConnection
protected HttpTunnelConnection(String url, ClientHttpRequestFactory requestFactory, Executor executor) Create a newHttpTunnelConnection
instance.- Parameters:
url
- the URL to connect torequestFactory
- the HTTP request factoryexecutor
- the executor used to handle connections
-
-
Method Details
-
open
public HttpTunnelConnection.TunnelChannel open(WritableByteChannel incomingChannel, Closeable closeable) throws Exception Description copied from interface:TunnelConnection
Open the tunnel connection.- Specified by:
open
in interfaceTunnelConnection
- Parameters:
incomingChannel
- aWritableByteChannel
that should be used to write any incoming data received from the remote servercloseable
- a closeable to call when the channel is closed- Returns:
- a
WritableByteChannel
that should be used to send any outgoing data destined for the remote server - Throws:
Exception
- in case of errors
-
createRequest
- Throws:
IOException
-